login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A192495
Smallest prime p such that there is a gap of phi(n) between p and next prime.
1
2, 2, 3, 3, 7, 3, 23, 7, 23, 7, 139, 7, 199, 23, 89, 89, 1831, 23, 523, 89, 199, 139, 1129, 89, 887, 199, 523, 199, 2971, 89, 4297, 1831, 887, 1831, 1669, 199, 9551, 523, 1669, 1831, 19333, 199, 16141, 887, 1669, 1129, 81463, 1831, 16141
OFFSET
1,1
LINKS
FORMULA
a(n) = A000230(phi(n)/2) for n >= 3. - Robert Israel, Jan 10 2017
EXAMPLE
a(9) = 23 because 29 - 23 = 6 = phi(9).
MAPLE
A192495 := proc(n) pn := numtheory[phi](n) ; for i from 1 do if ithprime(i+1) -ithprime(i) = pn then return ithprime(i) ; end if; end do: end proc:
seq(A192495(n), n=1..80) ; # R. J. Mathar, Jul 03 2011
MATHEMATICA
a[n_] := If[n==1, 2, (For[m=1, Prime[m+1]-Prime[m]!= EulerPhi[n], m++ ]; Prime[m])]; Table[a[n], {n, 50}]
CROSSREFS
KEYWORD
nonn
AUTHOR
Michel Lagneau, Jul 02 2011
EXTENSIONS
Corrected by R. J. Mathar, Jul 03 2011
STATUS
approved