OFFSET
1,8
LINKS
G. C. Greubel, Table of n, a(n) for n = 1..1000
EXAMPLE
n = 31: Phi(31) = 30 from which 10 is prime and 20 is not: a(31) = 20-10 = 10;
n = 20: Phi(20) = 8 from which 6 are primes and 2 are not: a(20) = 2-6 = -4;
n = 15: reduced residue system = {1,2,7,4,8,11,13,14}, primes = {2,7,11,13,}, nonprimes = {2,4,8,14}, thus a(15) = 4-4 = 0.
MATHEMATICA
Table[EulerPhi[n] - 2*PrimePi[n] + 2*PrimeNu[n] , {n, 1, 50}] (* G. C. Greubel, May 12 2017 *)
CROSSREFS
KEYWORD
sign
AUTHOR
STATUS
approved