login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A072917 a(n) = p(n) - phi(n), where p(n) is the least prime greater than phi(n). 2
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 3, 1, 1, 1, 3, 1, 1, 1, 3, 3, 1, 1, 1, 1, 3, 1, 1, 3, 1, 5, 1, 1, 1, 5, 1, 1, 1, 1, 3, 5, 1, 1, 1, 1, 3, 5, 5, 1, 1, 1, 5, 1, 1, 1, 1, 1, 1, 1, 5, 5, 3, 1, 5, 3, 5, 1, 5, 1, 1, 1, 1, 1, 5, 1, 5, 5, 1, 1, 5, 3, 1, 3, 1, 1, 5, 1, 3, 1, 1, 1, 5, 1, 1, 1, 1 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,15
LINKS
FORMULA
a(n) = A013632(A000010(n)). - Antti Karttunen, Aug 22 2017
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
Sequence in context: A079075 A086703 A242849 * A319861 A114266 A230206
KEYWORD
easy,nonn
AUTHOR
Joseph L. Pe, Aug 11 2002
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 24 08:21 EDT 2024. Contains 371926 sequences. (Running on oeis4.)