%I #8 Feb 11 2014 19:05:23
%S 1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,2,1,1,1,2,1,1,1,2,3,1,1,1,1,2,1,1,3,1,
%T 3,1,1,1,3,1,1,1,1,3,3,1,1,1,1,3,2,3,1,1,1,3,1,1,1,1,1,1,1,2,2,3,1,2,
%U 4,3,1,3,1,1,1,1,1,3,1,2
%N a(n) = least k such that phi^(k)(n) + 1 is prime, where phi^(k) denotes application of phi k times.
%H Charles R Greathouse IV, <a href="/A066422/b066422.txt">Table of n, a(n) for n = 1..10000</a>
%e EulerPhi(EulerPhi(15)) + 1 = EulerPhi(8) + 1 = 4 + 1 = 5, a prime; so a(15) = 2.
%o (PARI) a(n) = {nb = 1; n = eulerphi(n); while(! isprime(n+1), n = eulerphi(n); nb ++;); return (nb);} \\ _Michel Marcus_, May 18 2013
%Y Cf. A000010.
%K nonn
%O 1,15
%A _Joseph L. Pe_, Dec 26 2001
%E Corrected and extended by _Michel Marcus_, May 18 2013
|