After watching this @numberphile video I wanted to give it a try.
Then I came up with this piece if python code to try to find a possible 12 iteration sequence.
def factors(nr): i = 2 factors = [] while i <= nr: if (nr % i) == 0: factors.append(i) nr = nr / i else: i = i + 1 return factors def per_internal(iteration, number, doPrint = False): if doPrint: print '{} {} {}'.format(iteration, number, factors(number)) if len(str(number)) == 1: return iteration digits = [int(i) for i in str(number)] result = 1 for digit in digits: result *= digit return per_internal(iteration + 1, result, doPrint) def per(number, doPrint = False): return per_internal(0, number, doPrint) for x in range(0, 54): for y in range(0, 54): for z in range (0, 54): candidate = 2**x * 3**y * 7**z iterations = per(candidate, False) if iterations >= 10: per(candidate, True)
Result:
0 937638166841712 [2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 7, 7, 7, 7, 7] 1 438939648 [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 7, 7] 2 4478976 [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3] 3 338688 [2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 7, 7] 4 27648 [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3] 5 2688 [2, 2, 2, 2, 2, 2, 2, 3, 7] 6 768 [2, 2, 2, 2, 2, 2, 2, 2, 3] 7 336 [2, 2, 2, 2, 3, 7] 8 54 [2, 3, 3, 3] 9 20 [2, 2, 5] 10 0 [] 0 4996238671872 [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 7, 7, 7, 7, 7, 7] 1 438939648 [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 7, 7] 2 4478976 [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3] 3 338688 [2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 7, 7] 4 27648 [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3] 5 2688 [2, 2, 2, 2, 2, 2, 2, 3, 7] 6 768 [2, 2, 2, 2, 2, 2, 2, 2, 3] 7 336 [2, 2, 2, 2, 3, 7] 8 54 [2, 3, 3, 3] 9 20 [2, 2, 5] 10 0 []
Just put the prime factors after each other and you have your initial number.
You don’t have to search any further because 222222222222222222222222222222222222222222222222222222 is the
Below this number, no numbers are found that create a 12 number sequence.
Sorry Matt,
11 is the max