A045352 Primes congruent to {1, 2, 5, 7} mod 8.
2, 5, 7, 13, 17, 23, 29, 31, 37, 41, 47, 53, 61, 71, 73, 79, 89, 97, 101, 103, 109, 113, 127, 137, 149, 151, 157, 167, 173, 181, 191, 193, 197, 199, 223, 229, 233, 239, 241, 257, 263, 269, 271, 277, 281, 293, 311
Offset: 1
Links
- Ray Chandler, Table of n, a(n) for n = 1..10000 (first 1000 terms from Vincenzo Librandi)
Programs
-
Magma
[ p: p in PrimesUpTo(1000) | p mod 8 in {1, 2, 5, 7} ]; // Vincenzo Librandi, Aug 07 2012
-
Maple
select(isprime, map(t -> op([1,2,5,7] + t*[8,8,8,8]), [$0..100])); # Robert Israel, Sep 12 2014
-
Mathematica
Select[Prime[Range[300]],MemberQ[{1, 2, 5, 7},Mod[#,8]]&] (* Vincenzo Librandi, Aug 07 2012 *)
-
PARI
isok(n)=isprime(n) && n%8%3 != 0 \\ Edward Jiang, Sep 09 2014
Comments