OFFSET
1,2
COMMENTS
Asymptotic density is 0.379...
LINKS
Amiram Eldar, Table of n, a(n) for n = 1..10000
José María Grau, Florian Luca and Antonio M. Oller-Marcén, On a variant of Giuga numbers, Acta Mathematica Sinica, English Series, Vol. 28 No. 4 (2012), pp 653-660; preprint, arXiv:1103.3428 [math.NT], 2011.
MATHEMATICA
gi[n_]:=Mod[Sum[PowerMod[j, (n-1)/2, n], {j, n-1}], n]; Select[ Range[1, 300, 2], gi[#]==0&]
PROG
(PARI) is(n)=my(e=(n-1)/2); sum(k=1, n-1, Mod(k, n)^e)==0;
select(is, vector(1000, i, 2*i-1)) \\ on older versions, switch the arguments
\\ Charles R Greathouse IV, Mar 19 2011
CROSSREFS
KEYWORD
nonn
AUTHOR
José María Grau Ribas, Mar 16 2011
STATUS
approved