OFFSET
1,2
COMMENTS
The aliquot sequence for n is the trajectory of n under repeated application of the map A001065 = x -> sigma(x) - x.
The trajectory will either have a transient part followed by a cyclic part, or have an infinite transient part and never cycle.
Sequence gives (length of transient part of trajectory) + (length of cycle if the trajectory did not reach 0). In other words, here we consider that the trajectory ends if we reach 1.
Given that A001065(n) is the sum of the divisors of n which are less than n, we have that the aliquot length A(n) = r-1 where r is the smallest integer such that A001065^r(n) = A001065^s(n) for some s<r. If this never happens (i.e., if r is infinite) then we set a(n) = 0. [Edited by M. F. Hasler, Nov 16 2013]
In the interval [1,1000] it is not known if the aliquot length is 0 for the numbers 276, 552, 564, 660 and 966.
The function sigma = A000203 (and thus A001065 = sigma - id) is defined only on the positive integers and not for 0, so the trajectory ends when 0 is reached. - M. F. Hasler, Nov 16 2013
LINKS
T. D. Noe, Table of n, a(n) for n=1..275
Wolfgang Creyaufmüller, Prime Families
Eric Weisstein's World of Mathematics, Aliquot Sequence
P. Zimmermann, Aliquot Sequences
EXAMPLE
a(12) = 7:
12 is divisible by 1,2,3,4 and 6 so sigma(12)=16;
16 is divisible by 1,2,4 and 8 so sigma(16)=15;
15 is divisible by 1,3 and 5 so sigma(15)=9;
9 is divisible by 1 and 3 so sigma(9)=4;
4 is divisible by 1 and 2 so sigma(4)=3;
3 is divisible only by 1 so sigma(3)=1;
1 is not divisible by anything less than 1 so sigma(1)=0.
The aliquot sequence is therefore 16, 15, 9, 4, 3, 1, 0 which is 7 elements long. Therefore a(12) = 7.
MATHEMATICA
f[n_]:=Plus@@Divisors[n]-n; lst2={}; Do[lst={}; a=k; Do[b=a; a=f[a]; AppendTo[lst, a]; If[a==0||a==b, Break[]], {n, 7!}]; AppendTo[lst2, Length[lst]], {k, 5!}]; lst2 (* Vladimir Joseph Stephan Orlovsky, Apr 24 2010 *)
CROSSREFS
KEYWORD
nonn,nice
AUTHOR
Aza Raskin (aza(AT)uchicago.edu), Jun 25 2003
STATUS
approved