A098007 Length of aliquot sequence for n, or -1 if aliquot sequence never cycles.
2, 3, 3, 4, 3, 1, 3, 4, 5, 5, 3, 8, 3, 6, 6, 7, 3, 5, 3, 8, 4, 7, 3, 6, 2, 8, 4, 1, 3, 16, 3, 4, 7, 9, 4, 5, 3, 8, 4, 5, 3, 15, 3, 6, 8, 9, 3, 7, 5, 4, 5, 10, 3, 14, 4, 6, 4, 5, 3, 12, 3, 10, 4, 5, 4, 13, 3, 6, 5, 7, 3, 10, 3, 6, 6, 6, 4, 12, 3, 8, 6, 7, 3, 7, 4, 10, 8, 8, 3, 11, 5, 7, 5, 5, 3, 10, 3, 4, 5, 6
Offset: 1
Examples
Examples of trajectories: 1, 0. 2, 1, 0. 3, 1, 0. (and similarly for any prime) 4, 3, 1, 0. 5, 1, 0. 6, 6, 6, ... (and similarly for any perfect number) 8, 7, 1, 0. 9, 4, 3, 1, 0. 12, 16, 15, 9, 4, 3, 1, 0. 14, 10, 8, 7, 1, 0. 25, 6, 6, 6, ... 28, 28, 28, ... (the next perfect number) 30, 42, 54, 66, 78, 90, 144, 259, 45, 33, 15, 9, 4, 3, 1, 0. 42, 54, 66, 78, 90, 144, 259, 45, 33, 15, 9, 4, 3, 1, 0.
References
- K. Chum, R. K. Guy, M. J. Jacobson, Jr., and A. S. Mosunov, Numerical and statistical analysis of aliquot sequences. Exper. Math. 29 (2020), no. 4, 414-425; arXiv:2110.14136, Oct. 2021 [math.NT].
- J.-P. Delahaye, Les inattendus mathématiques, Chapter 19, "Nombres amiables et suites aliquotes", pp. 217-229, Belin-Pour la Science, Paris 2004.
- G. Everest, A. van der Poorten, I. Shparlinski and T. Ward, Recurrence Sequences, Amer. Math. Soc., 2003; see esp. p. 255.
- R. K. Guy, Unsolved Problems in Number Theory, B6.
- 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.
- Carl Pomerance, The aliquot constant, after Bosma and Kane, Q. J. Math. 69 (2018), no. 3, 915-930.
Links
- T. D. Noe and N. J. A. Sloane, Table of n, a(n) for n = 1..275
- Christophe Clavier, Aliquot Sequences
- Paul Erdős, Andrew Granville, Carl Pomerance and Claudia Spiro, On the normal behavior of the iterates of some arithmetic functions, Analytic number theory, Birkhäuser Boston, 1990, pp. 165-204.
- Paul Erdos, Andrew Granville, Carl Pomerance and Claudia Spiro, On the normal behavior of the iterates of some arithmetic functions, Analytic number theory, Birkhäuser Boston, 1990, pp. 165-204. [Annotated copy with A-numbers]
- T. D. Noe and N. J. A. Sloane, Table of n, a(n) for n = 1..1000 with "NA" for unknown terms
- Passawan Noppakaew and Prapanpong Pongsriiam, Product of Some Polynomials and Arithmetic Functions, J. Int. Seq. (2023) Vol. 26, Art. 23.9.1.
- N. J. A. Sloane, "A Handbook of Integer Sequences" Fifty Years Later, arXiv:2301.03149 [math.NT], 2023, p. 14.
- Juan L. Varona, List of "primitive" numbers not known to terminate (Oct 19 2004: list begins 276, 552, 564, 660, 966, 1074, 1134, 1464, 1476, 1488, 1512, 1560, 1578, 1632, 1734, 1920, 1992, ...) [This is not the full list of numbers not known to terminate - see Comments above]
- Eric Weisstein's World of Mathematics, Aliquot Sequence.
- Wikipedia, Aliquot sequence
- P. Zimmermann, Aliquot Sequences
- Index entries for sequences related to aliquot parts.
Crossrefs
Cf. A001065.
There are many related sequences:
Length of transient part + length of cycle: this sequence. Other versions of the current sequence: A044050, A003023.
Numbers which eventually reach 1 (or equivalently 0): A080907.
Aliquot trajectories for certain interesting starting values: A008885 (for 30), A008886 A008887 A008888 A008889 A008890 A008891 A008892 (for 276), A014360 A014361 A074907 A014362 A045477 A014363 A014364 A014365 A074906, A171103.
For n < 220, A098008 = A098007 - 1, i.e., 220 is the first sociable number. - Robert G. Wilson v, Sep 10 2004
Programs
-
Maple
f:=proc(n) local t1, i,j,k; t1:=[n]; for i from 2 to 50 do j:= t1[i-1]; k:=sigma(j)-j; t1:=[op(t1), k]; od: t1; end; # produces trajectory for n # 2nd implementation: A098007 := proc(n) local trac, x; x := n ; trac := [x] ; while true do x := numtheory[sigma](x)-trac[-1] ; if x = 0 then return 1+nops(trac) ; elif x in trac then return nops(trac) ; end if; trac := [op(trac), x] ; end do: end proc: seq(A098007(n), n=1..100) ; # R. J. Mathar, Oct 08 2017
-
Mathematica
g[n_] := If[n > 0, DivisorSigma[1, n] - n, 0]; f[n_] := NestWhileList[g, n, UnsameQ, All]; Table[ Length[ f[n]] - 1, {n, 100}] (* Robert G. Wilson v, Sep 10 2004 *)
-
PARI
apply( {A098007(n, t=0)=until(bittest(t,if(n,n=sigma(n)-n)),t+=1<
M. F. Hasler, Feb 24 2018, improved Aug 14 2022 thanks to a remark from Jianing Song -
Python
from sympy import divisor_sigma as sigma def a(n, limit=float('inf')): alst = []; seen = set(); i = n; c = 0 while i and i not in seen and c < limit: alst.append(i); seen.add(i); i = sigma(i) - i; c += 1 return "NA" if c == limit else len(set(alst + [i])) print([a(n) for n in range(1, 101)]) # Michael S. Branicky, Jul 11 2021
-
Scheme
(define (A098007 n) (let loop ((visited (list n)) (i 1)) (let ((next (A001065 (car visited)))) (cond ((zero? next) (+ 1 i)) ((member next visited) i) (else (loop (cons next visited) (+ 1 i))))))) (define (A001065 n) (- (A000203 n) n)) ;; For an implementation of A000203, see under that entry. ;; Antti Karttunen, Nov 01 2017
Extensions
More terms from Robert G. Wilson v and John W. Layman, Sep 10 2004
Comments