A042998 Primes congruent to {1, 2, 3, 5} (mod 8).
2, 3, 5, 11, 13, 17, 19, 29, 37, 41, 43, 53, 59, 61, 67, 73, 83, 89, 97, 101, 107, 109, 113, 131, 137, 139, 149, 157, 163, 173, 179, 181, 193, 197, 211, 227, 229, 233, 241, 251, 257, 269, 277, 281, 283, 293, 307
Offset: 1
Links
- Ray Chandler, Table of n, a(n) for n = 1..10000 (first 1000 terms from Vincenzo Librandi)
- Wikipedia, Legendre's three-square theorem
Programs
-
Magma
[p: p in PrimesUpTo(500) | p mod 8 in [1, 2, 3, 5]]; // Vincenzo Librandi, Aug 08 2012
-
Mathematica
Select[Prime[Range[300]],MemberQ[{1,2,3,5},Mod[#,8]]&] (* Vincenzo Librandi, Aug 08 2012 *)
-
PARI
is(n)=n%8<6 && isprime(n) \\ Charles R Greathouse IV, Sep 15 2015
Comments