OFFSET
-2,1
COMMENTS
Although pi takes all values, solutions are not guaranteed since nontotient numbers exist.
a(63) does not exist since by bounds on phi and pi, phi(x) - pi(x) > 129 > 63 for x > 2000 and no smaller x yields a difference of 63. [Charles R Greathouse IV, Oct 31 2011]
EXAMPLE
n=92: phi(92)=44, pi(92)=24, a(44-24)=a(20)=92; n=63: no solution was found at x<=1000000.
a(-2) = 30, since phi(30) - pi(30) = 8 - 10 = -2.
MATHEMATICA
Function[s, Function[t, Take[#, 54] &@ ReplacePart[t, Map[# + 3 -> Lookup[s, #][[-1]] &, Keys@ s]]]@ ConstantArray[0, Max@ Keys@ s + 3]]@ KeySort@ PositionIndex@ Array[EulerPhi@ # - PrimePi@ # &, 10^5] (* Michael De Vlieger, Jul 20 2017 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Labos Elemer, Aug 02 2002
EXTENSIONS
a(-2) added by Michael De Vlieger, Jul 21 2017
STATUS
approved