A098006 (p-1)/2 - phi(p-1) as p runs through the odd primes.
0, 0, 1, 1, 2, 0, 3, 1, 2, 7, 6, 4, 9, 1, 2, 1, 14, 13, 11, 12, 15, 1, 4, 16, 10, 19, 1, 18, 8, 27, 17, 4, 25, 2, 35, 30, 27, 1, 2, 1, 42, 23, 32, 14, 39, 57, 39, 1, 42, 4, 23, 56, 25, 0, 1, 2, 63, 50, 44, 49, 2, 57, 35, 60, 2, 85, 72, 1, 62, 16, 1, 63, 66, 81, 1, 2, 78, 40, 76, 29, 114, 47
Offset: 2
References
- J. Browkin and A. Schinzel, On integers not of the form n-phi(n), Colloq. Math., 68 (1995), 55-58.
- F. Luca and P. G. Walsh, On the number of nonquadratic residues which are not primitive roots, Colloq. Math., 100 (2004), 91-93.
Links
- T. D. Noe, Table of n, a(n) for n = 2..10000
- T. D. Noe, Finding primes p for which (p-1)/2 - phi(p-1) = k
Programs
-
Haskell
a098006 n = a005097 (n-1) - a000010 (a006093 n) -- Reinhard Zumkeller, Mar 26 2013
-
Magma
[(NthPrime(n)-1)/2 - EulerPhi(NthPrime(n)-1): n in [2..100]]; // Vincenzo Librandi, Jan 10 2017
-
Maple
A098006 := proc(n) local p; p := ithprime(n+1) ; (p-1)/2-numtheory[phi](p-1) ; end proc: seq(A098006(n),n=1..30) ; # R. J. Mathar, Jan 09 2017
-
Mathematica
Table[(Prime[n] - 1)/2 - EulerPhi[Prime[n] - 1], {n, 2, 85}] (* Robert G. Wilson v, Sep 09 2004 *) Table[(n-1)/2-EulerPhi[n-1],{n,Prime[Range[2,100]]}] (* Harvey P. Dale, Oct 23 2016 *)
-
PARI
forprime(p=3,1e3,print1(p\2-eulerphi(p-1)", ")) \\ Charles R Greathouse IV, Feb 04 2013
Comments