OFFSET
1,2
MATHEMATICA
f[n_] := Mod[Range[n]^2, n]; Select[Range@ 10000, AllTrue[f@ #, Length@ FactorInteger[#] == 1 &] &] (* AllTrue function introduced with Version 10; Michael De Vlieger, Jan 29 2015 *)
PROG
(PARI) is(n)=for(i=2, 9, if(!isprimepower(i^2%n) && i^2%n>1, return(0))); 1 \\ Charles R Greathouse IV, Jan 30 2015
CROSSREFS
KEYWORD
nonn,fini,full
AUTHOR
Joerg Arndt, Jan 28 2015
STATUS
approved