OFFSET
1,4
COMMENTS
For smallest prime that requires n steps to reach 2 cf. A082449.
LINKS
Ruud H.G. van Tol, Table of n, a(n) for n = 1..10000
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
KEYWORD
nonn
AUTHOR
Klaus Brockhaus, May 01 2003
STATUS
approved