login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A065428 Numbers n such that no x^2 mod n is prime. 6
1, 2, 3, 4, 5, 8, 12, 15, 16, 24, 28, 40, 48, 56, 60, 72, 88, 112, 120, 168, 232, 240, 280, 312, 408, 520, 760, 840, 1320, 1848 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,2

COMMENTS

All numbers in this sequence except 56 are idoneal (A000926) - Joerg Arndt, Jul 13 2005

No more terms < 10^6. - T. D. Noe, Aug 10 2007

No more terms < 10^11. - Charles R Greathouse IV, Dec 15 2008

Numbers x such that all x^3 mod n are nonprimes are 1, 2, 7, 9, 63, and apparently no more.

LINKS

Table of n, a(n) for n=1..30.

Joerg Arndt, Matters Computational (The Fxtbook), p. 784

MATHEMATICA

t={}; Do[s=Union[Mod[Range[n]^2, n]]; If[Select[s, PrimeQ]=={}, AppendTo[t, n]], {n, 1000}]; t  (* T. D. Noe, Aug 10 2007 *)

nx2pQ[n_]:=Module[{m=PowerMod[Range[3n], 2, n]}, Count[ FindTransientRepeat[ m, 2][[2]], _?PrimeQ]==0]; Select[Range[2000], nx2pQ] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Jun 11 2019 *)

PROG

(PARI) for(n=1, 10^9, q=1; for(x=1, n-1, if(isprime(lift(Mod(x, n)^2)), q=0; break())); if(q, print1(n, ", "))); \\ edited, Joerg Arndt, Jan 28 2015

(Haskell)

a065428 n = a065428_list !! (n-1)

a065428_list = filter f [1..] where

   f x = all (== 0) $

         map (a010051' . (`mod` x) . a000290) [a000196 x .. x-1]

-- Reinhard Zumkeller, Aug 01 2012, Aug 15 2011

CROSSREFS

Cf. A179402 (x^4 mod n).

Cf. A010051, A000196, A000290.

Cf. A214583 (n such that for all k with gcd(n, k) = 1 and n > k^2, n - k^2 is prime).

Sequence in context: A122700 A048486 A179402 * A059747 A254328 A094087

Adjacent sequences:  A065425 A065426 A065427 * A065429 A065430 A065431

KEYWORD

nonn,nice,more,changed

AUTHOR

Joerg Arndt, Nov 16 2001

STATUS

approved

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified September 27 19:04 EDT 2020. Contains 337388 sequences. (Running on oeis4.)