OFFSET
1,15
LINKS
Antti Karttunen, Table of n, a(n) for n = 1..10000
FORMULA
EXAMPLE
phi(15) = 8 and the least prime > 8 is 11; hence a(15) = 11 - 8 = 3.
MATHEMATICA
a[n_] := Module[{r, p}, p = EulerPhi[n]; r = p + 1; While[ ! PrimeQ[r], r = r + 1]; r - p]; Table[a[i], {i, 1, 100}]
lpg[n_]:=Module[{ep=EulerPhi[n]}, NextPrime[ep]-ep]; Array[lpg, 200] (* Harvey P. Dale, May 29 2017 *)
PROG
(PARI) A072917(n) = (nextprime(1+eulerphi(n)) - eulerphi(n)); \\ Antti Karttunen, Aug 22 2017
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Joseph L. Pe, Aug 11 2002
STATUS
approved