A064922 Number of iterations in A064920 to reach a prime.
0, 0, 1, 0, 2, 0, 1, 1, 3, 0, 3, 0, 2, 1, 2, 0, 2, 0, 2, 2, 4, 0, 4, 2, 3, 1, 4, 0, 4, 0, 1, 1, 3, 1, 3, 0, 3, 2, 4, 0, 4, 0, 3, 1, 5, 0, 3, 1, 3, 1, 3, 0, 3, 2, 3, 3, 5, 0, 3, 0, 2, 2, 2, 1, 3, 0, 3, 3, 3, 0, 4, 0, 4, 1, 5, 1, 3, 0, 3, 1, 5, 0, 3, 3, 4, 1, 3, 0, 5, 1, 4, 2, 4, 1, 4, 0, 3, 1, 5, 0, 5, 0, 3, 3, 4
Offset: 2
Keywords
Examples
a(18) = 2 as A064920(A064920(18)) = A064920(8) = 5 = A064921(18).
Links
- Harry J. Smith, Table of n, a(n) for n = 2..1000
Programs
-
PARI
gpf(n)= { local(f); f=factor(n)~; return(f[1, length(f)]) } { for (n=2, 1000, m=n; a=0; while (!isprime(m), g=gpf(m); m=m / g + g - 1; a++); write("b064922.txt", n, " ", a) ) } \\ Harry J. Smith, Sep 29 2009
Comments