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!)
A045331 Primes congruent to {1, 2, 3} mod 6; or, -3 is a square mod p. 13
2, 3, 7, 13, 19, 31, 37, 43, 61, 67, 73, 79, 97, 103, 109, 127, 139, 151, 157, 163, 181, 193, 199, 211, 223, 229, 241, 271, 277, 283, 307, 313, 331, 337, 349, 367, 373, 379, 397, 409, 421, 433, 439, 457, 463, 487, 499, 523, 541, 547, 571, 577, 601, 607, 613 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
COMMENTS
-3 is a quadratic residue mod a prime p iff p is in this sequence.
LINKS
MATHEMATICA
Select[Prime[Range[200]], MemberQ[{1, 2, 3}, Mod[#, 6]]&] (* Harvey P. Dale, Mar 31 2011 *)
Join[{2, 3}, Select[Range[7, 10^3, 6], PrimeQ]] (* Zak Seidov, May 20 2011 *)
PROG
(PARI) select(n->n%6<5, primes(100)) \\ Charles R Greathouse IV, May 20 2011
(Magma) [p: p in PrimesUpTo(700) | p mod 6 in [1, 2, 3]]; // Vincenzo Librandi, Aug 08 2012
(Haskell)
a045331 n = a045331_list !! (n-1)
a045331_list = filter ((< 4) . (`mod` 6)) a000040_list
-- Reinhard Zumkeller, Jan 15 2013
CROSSREFS
Apart from initial term, same as A007645; apart from initial two terms, same as A002476.
Subsequence of A047246.
Sequence in context: A051484 A101415 A210393 * A053613 A013645 A130272
KEYWORD
nonn,nice,easy
AUTHOR
EXTENSIONS
More terms from Henry Bottomley, Aug 10 2000
STATUS
approved

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 24 02:42 EDT 2024. Contains 371917 sequences. (Running on oeis4.)