login
This site is supported by donations to The OEIS Foundation.

 

Logo

The OEIS is looking to hire part-time people to help edit core sequences, upload scanned documents, process citations, fix broken links, etc. - Neil Sloane, njasloane@gmail.com

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A039655 Number of iterations of f(x) = sigma(x)-1 on n required to reach a prime. 2
0, 0, 2, 0, 1, 0, 2, 5, 1, 0, 4, 0, 1, 1, 2, 0, 2, 0, 1, 1, 2, 0, 1, 2, 1, 3, 2, 0, 1, 0, 5, 1, 1, 1, 2, 0, 1, 2, 1, 0, 4, 0, 1, 5, 1, 0, 2, 4, 2, 1, 1, 0, 3, 1, 3, 1, 1, 0, 1, 0, 4, 1, 2, 1, 2, 0, 3, 4, 2, 0, 2, 0, 1, 2, 1, 4, 1, 0, 2, 2, 3, 0, 1, 1, 1, 3, 1, 0, 1, 2, 1, 1, 2, 3, 1, 0, 3, 2, 2, 0, 2, 0, 2, 1, 2 (list; graph; refs; listen; history; text; internal format)
OFFSET

2,3

LINKS

Charles R Greathouse IV, Table of n, a(n) for n = 2..10000

MathOverflow, Does iterating a certain function related to the sums of divisors eventually always result in a prime value?, 2014

MATHEMATICA

f[n_] := Plus @@ Divisors@n - 1; g[n_] := Length@ NestWhileList[ f@# &, n, !PrimeQ@# &] - 1; Table[ g@n, {n, 2, 106}] (* Robert G. Wilson v, May 07 2010 *)

PROG

(PARI) a(n)=my(t); while(!isprime(n), n=sigma(n)-1; t++); t \\ Charles R Greathouse IV, Sep 16 2014

CROSSREFS

Cf. A039649-A039656.

Sequence in context: A030010 A163577 A132178 * A103775 A093057 A065334

Adjacent sequences:  A039652 A039653 A039654 * A039656 A039657 A039658

KEYWORD

nonn

AUTHOR

David W. Wilson

STATUS

approved

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

License Agreements, Terms of Use, Privacy Policy .

Last modified May 25 19:28 EDT 2017. Contains 287059 sequences.