cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A045331 Primes congruent to {1, 2, 3} mod 6; or, -3 is a square mod p.

This page as a plain text file.
%I A045331 #31 Mar 08 2022 12:06:15
%S A045331 2,3,7,13,19,31,37,43,61,67,73,79,97,103,109,127,139,151,157,163,181,
%T A045331 193,199,211,223,229,241,271,277,283,307,313,331,337,349,367,373,379,
%U A045331 397,409,421,433,439,457,463,487,499,523,541,547,571,577,601,607,613
%N A045331 Primes congruent to {1, 2, 3} mod 6; or, -3 is a square mod p.
%C A045331 -3 is a quadratic residue mod a prime p iff p is in this sequence.
%H A045331 Vincenzo Librandi, <a href="/A045331/b045331.txt">Table of n, a(n) for n = 1..1000</a>
%t A045331 Select[Prime[Range[200]],MemberQ[{1,2,3},Mod[#,6]]&]  (* _Harvey P. Dale_, Mar 31 2011 *)
%t A045331 Join[{2,3},Select[Range[7,10^3,6],PrimeQ]] (* _Zak Seidov_, May 20 2011 *)
%o A045331 (PARI) select(n->n%6<5,primes(100)) \\ _Charles R Greathouse IV_, May 20 2011
%o A045331 (Magma) [p: p in PrimesUpTo(700) | p mod 6 in [1, 2, 3]]; // _Vincenzo Librandi_, Aug 08 2012
%o A045331 (Haskell)
%o A045331 a045331 n = a045331_list !! (n-1)
%o A045331 a045331_list = filter ((< 4) . (`mod` 6)) a000040_list
%o A045331 -- _Reinhard Zumkeller_, Jan 15 2013
%Y A045331 Apart from initial term, same as A007645; apart from initial two terms, same as A002476.
%Y A045331 Cf. A002313, A033203, A038873, A038874, A057128.
%Y A045331 Subsequence of A047246.
%K A045331 nonn,nice,easy
%O A045331 1,1
%A A045331 _N. J. A. Sloane_
%E A045331 More terms from _Henry Bottomley_, Aug 10 2000