OFFSET
1,1
LINKS
Charles R Greathouse IV, Table of n, a(n) for n = 1..10000
J. M. Grau, Florian Luca, Antonio M. Oller-Marcen, On a variant of Giuga numbers, arXiv:1103.3428 [math.NT], 2011.
MAPLE
isA188159 := proc(n) if type(n, 'odd') then add( i^((n-1)/2), i=1..n-1) ; is(% mod n <>0 ); else false; end if; end proc:
for n from 1 to 350 by 2 do if isA188159(n) then printf("%d, ", n) ; end if; end do: # R. J. Mathar, Mar 30 2011
MATHEMATICA
okQ[n_] := Mod[Sum[PowerMod[j, (n-1)/2, n], {j, n-1}], n]==0; Select[Range[1, 1000, 2], okQ]
PROG
(PARI) is(n)=if(n%2==0, return(0)); my(e=(n-1)/2); sum(k=1, n-1, Mod(k, n)^e)!=0 \\ Charles R Greathouse IV, Feb 04 2013
CROSSREFS
KEYWORD
nonn
AUTHOR
José María Grau Ribas, Mar 28 2011
STATUS
approved