login

Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.

Number of iterations in A064920 to reach a prime.
4

%I #9 Jun 21 2018 02:01:35

%S 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,

%T 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,

%U 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

%N Number of iterations in A064920 to reach a prime.

%C a(p) = 0 for all primes p.

%H Harry J. Smith, <a href="/A064922/b064922.txt">Table of n, a(n) for n = 2..1000</a>

%e a(18) = 2 as A064920(A064920(18)) = A064920(8) = 5 = A064921(18).

%o (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

%Y Cf. A064920, A064921, A064918.

%K nonn

%O 2,5

%A _Reinhard Zumkeller_, Oct 14 2001