login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A254329 Numbers n such that all x^2 mod n are prime powers (including 0 and 1). 1

%I #15 Feb 01 2015 15:36:25

%S 1,2,3,4,5,6,7,8,9,11,12,14,16,20,32

%N Numbers n such that all x^2 mod n are prime powers (including 0 and 1).

%t 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 *)

%o (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

%Y Cf. A065428, A254328.

%K nonn,fini,full

%O 1,2

%A _Joerg Arndt_, Jan 28 2015

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 20 00:03 EDT 2024. Contains 371798 sequences. (Running on oeis4.)