login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A098008 Length of transient part of aliquot sequence for n, or -1 if transient part is infinite. 21

%I #17 Nov 02 2017 15:35:11

%S 1,2,2,3,2,0,2,3,4,4,2,7,2,5,5,6,2,4,2,7,3,6,2,5,1,7,3,0,2,15,2,3,6,8,

%T 3,4,2,7,3,4,2,14,2,5,7,8,2,6,4,3,4,9,2,13,3,5,3,4,2,11,2,9,3,4,3,12,

%U 2,5,4,6,2,9,2,5,5,5,3,11,2,7,5,6,2,6,3,9,7,7,2,10,4,6,4,4,2,9,2,3,4,5,2,18

%N Length of transient part of aliquot sequence for n, or -1 if transient part is infinite.

%C See A098007 for further information.

%C a(n) = 0 if and only if n is perfect (A000396) or part of a cycle of length greater than 1. - Comment corrected by _Antti Karttunen_, Nov 02 2017.

%C It is believed that the first time a(n) = -1 is at n = 276 (see A008892). - _N. J. A. Sloane_, Nov 02 2017

%D R. K. Guy, Unsolved Problems in Number Theory, B6.

%D R. K. Guy and J. L. Selfridge, Interim report on aliquot series, pp. 557-580 of Proceedings Manitoba Conference on Numerical Mathematics. University of Manitoba, Winnipeg, Oct 1971.

%H Antti Karttunen, <a href="/A098008/b098008.txt">Table of n, a(n) for n = 1..275</a>

%e From _Antti Karttunen_, Nov 02 2017: (Start)

%e For n = 3, a(n) = 2, because A001065(3) = 1 and A001065(1) = 0, so it took two steps to end in zero.

%e For n = 25, a(n) = 1, because A001065(25) = 6, and A001065(6) = 6, so it took one step to enter into a cycle.

%e For n = 12496, a(n) = 0, because 12496 is a member of 5-cycle of map n -> A001065(n) (see A072891).

%e (End)

%t g[n_] := If[n > 0, DivisorSigma[1, n] - n, 0]; f[n_] := NestWhileList[g, n, UnsameQ, All]; Table[ Length[ f[n]] - 2, {n, 102}] (* good only for n<220 *) (* _Robert G. Wilson v_, Sep 10 2004 *)

%o (Scheme)

%o (define (A098008 n) (let loop ((visited (list n)) (i 1)) (let ((next (A001065 (car visited)))) (cond ((zero? next) i) ((member next visited) => (lambda (transientplus1) (- (length transientplus1) 1))) (else (loop (cons next visited) (+ 1 i))))))) ;; Good for at least n = 1..275.

%o (define (A001065 n) (- (A000203 n) n)) ;; For an implementation of A000203, see under that entry.

%o ;; _Antti Karttunen_, Nov 02 2017

%Y Cf. A001065, A098007, A044050, A003023, A008892. See A007906 for another version.

%Y Cf. A206708 (gives a proper subset of zeros).

%K nonn,easy,nice

%O 1,2

%A _N. J. A. Sloane_, Sep 09 2004

%E More terms from _Robert G. Wilson v_, Sep 10 2004

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified August 30 11:14 EDT 2024. Contains 375543 sequences. (Running on oeis4.)