OFFSET
0,1
COMMENTS
If n >= 3 and n is odd, then a(n) = 0.
LINKS
T. D. Noe, Table of n, a(n) for n = 0..10000
Eric Weisstein's World of Mathematics, Primitive Root
MATHEMATICA
nn = 100; t = Join[{1}, Table[p = PrimitiveRoot[n]; If[IntegerQ[p], EulerPhi[EulerPhi[n]], 0], {n, 2, 2*nn}]]; Table[s = Position[t, n, 1, 1]; If[s == {}, 0, s[[1, 1]]], {n, 0, nn}] (* T. D. Noe, Nov 14 2013 *)
PROG
(PARI) r=77; print1(8, ", ", 1, ", "); for(n=2, r, m=0; for(c=2*n+1, n^2+1, if(n%2==1, break); e=eulerphi(c); if(e==lcm(znstar(c)[2])&&eulerphi(e)==n, m=1; print1(c, ", "); break)); if(m==0, print1(0, ", ")));
CROSSREFS
KEYWORD
nonn
AUTHOR
Arkadiusz Wesolowski, Nov 13 2013
STATUS
approved