OFFSET
1,2
COMMENTS
We generate a chain via the following method:
Start with a number N. Compute the noncomposite factors of N and sum them together to get N'. Iterate this procedure until you reach a number you've already seen, at which point terminate.
The largest value of the sequence under 1,000,000 is N = 931844, which evaluates to 16.
Question: How quickly does this function grow relative to N?
EXAMPLE
1 : [[1]] -> 1
2 : [[1, 2], [1, 3], [1, 2, 2], [1, 5], [1, 2, 3]] -> 5
3 : [[1, 3], [1, 2, 2], [1, 5], [1, 2, 3]] -> 4
4 : [[1, 2, 2], [1, 5], [1, 2, 3]] -> 3
5 : [[1, 5], [1, 2, 3]] -> 2
6 : [[1, 2, 3]] -> 1
7 : [[1, 7], [1, 2, 2, 2]] -> 2
8 : [[1, 2, 2, 2], [1, 7]] -> 2
9 : [[1, 3, 3], [1, 7], [1, 2, 2, 2]] -> 3
PROG
(Python)
def prime_factors(n):
i = 2
factors = [1]
while i * i <= n:
if n % i:
i += 1
else:
n //= i
factors.append(i)
if n > 1:
factors.append(n)
return factors
def sum_of_factors_chain(N):
ctr, cur = 0, N
seen = set()
while cur not in seen:
factors = prime_factors(cur)
seen.add(cur)
cur = sum(factors)
ctr += 1
return ctr
CROSSREFS
KEYWORD
nonn
AUTHOR
Philip Weiss, Jul 01 2025
STATUS
approved
