OFFSET
1,1
COMMENTS
First differs from A045477 at n = 12.
840 is the least number whose infinitary aliquot sequence is not known to be finite or eventually periodic.
R. J. Mathar found that this sequence does not reach 0 or enter a cycle before the 1500th term (see A127661). This limit was extended to beyond the 3000th term (see the b-file).
LINKS
Amiram Eldar, Table of n, a(n) for n = 1..3132
EXAMPLE
MATHEMATICA
f[p_, e_] := Module[{b = IntegerDigits[e, 2]}, m = Length[b]; Product[If[b[[j]] > 0, 1 + p^(2^(m - j)), 1], {j, 1, m}]];
infs[n_] := If[n==1, 1, Times @@ f @@@ FactorInteger[n]] - n; infs[0] = 0;
seq[len_, init_] := NestWhileList[infs, init, UnsameQ, All, len];
seq[27, 840]
PROG
(PARI) s(n) = {my(f = factor(n), b); prod(i=1, #f~, b = binary(f[i, 2]); prod(k=1, #b, if(b[k], f[i, 1]^(2^(#b-k)) + 1, 1))) - n; }
lista(nmax) = {my(k = 840); for(n = 1, nmax, print1(k, ", "); if(k == 0, break); k = s(k)); }
CROSSREFS
KEYWORD
nonn
AUTHOR
Amiram Eldar, Mar 11 2023
STATUS
approved