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

 Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 59th year, we have over 358,000 sequences, and we’ve crossed 10,300 citations (which often say “discovered thanks to the OEIS”). Other ways to Give
 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A039655 Number of iterations of f(x) = sigma(x)-1 applied to n required to reach a prime, or -1 if no prime is ever reached. 14
 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 Hugo Pfoertner, Terms a(2)...a(1000000). N. J. A. Sloane, Three (No, 8) Lovely Problems from the OEIS, Experimental Mathematics Seminar, Rutgers University, Oct 05 2017, Part I, Part 2, Slides. (Mentions this sequence) 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. A039654, A039649, A039650, A039651, A039652, A039653, A039655, A039656. For records see A292114 and A292115. Sequence in context: A163577 A132178 A357869 * A357882 A103775 A331594 Adjacent sequences: A039652 A039653 A039654 * A039656 A039657 A039658 KEYWORD nonn AUTHOR EXTENSIONS Escape clause added by N. J. A. Sloane, Aug 31 2017 STATUS approved

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.

Last modified December 4 21:02 EST 2022. Contains 358570 sequences. (Running on oeis4.)