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!)
A083647 For primes p: Number of steps to reach 2 when iterating f(p) = greatest prime divisor of p-1. 3
0, 1, 1, 2, 2, 2, 1, 2, 3, 3, 2, 2, 2, 3, 4, 3, 4, 2, 3, 3, 2, 3, 3, 3, 2, 2, 2, 4, 2, 3, 3, 3, 2, 4, 3, 2, 3, 2, 4, 4, 4, 2, 3, 2, 3, 3, 3, 3, 4, 3, 4, 2, 2, 2, 1, 4, 4, 2, 4, 3, 5, 3, 2, 3, 3, 4, 3, 3, 5, 4, 3, 5, 3, 3, 3, 4, 3, 3, 2, 2, 3, 3, 4, 2, 3, 2, 3, 3, 4, 3, 5, 3, 2, 3, 4, 3, 4, 3, 4, 2, 3, 5, 4, 4, 3 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,4
COMMENTS
For smallest prime that requires n steps to reach 2 cf. A082449.
LINKS
EXAMPLE
59 is the 17th prime and takes four steps to reach 2 (59 -> 29 -> 7 ->3 -> 2), so a(17) = 4.
MATHEMATICA
Table[Length[NestWhileList[FactorInteger[#-1][[-1, 1]]&, Prime[n], #!=2&]]-1, {n, 110}] (* Harvey P. Dale, Feb 27 2012 *)
PROG
(PARI) {forprime(p=2, 571, q=p; c=0; while(q>2, fac=factor(q-1); q=fac[matsize(fac)[1], 1]; c++); print1(c, ", "))}
CROSSREFS
Sequence in context: A162545 A162544 A209323 * A364332 A346389 A056691
KEYWORD
nonn
AUTHOR
Klaus Brockhaus, May 01 2003
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.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 19 12:06 EDT 2024. Contains 371792 sequences. (Running on oeis4.)