OFFSET
1,1
COMMENTS
-3 is a quadratic residue mod a prime p iff p is in this sequence.
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 1..1000
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
Subsequence of A047246.
KEYWORD
nonn,nice,easy
AUTHOR
EXTENSIONS
More terms from Henry Bottomley, Aug 10 2000
STATUS
approved