A214588 Primes p such that p mod 16 < 8.
2, 3, 5, 7, 17, 19, 23, 37, 53, 67, 71, 83, 97, 101, 103, 113, 131, 149, 151, 163, 167, 179, 181, 193, 197, 199, 211, 227, 229, 241, 257, 263, 277, 293, 307, 311, 337, 353, 359, 373, 389, 401, 419, 421, 433, 439, 449, 467, 487, 499, 503, 547, 563, 577, 593, 599
Offset: 1
Keywords
Examples
103 is in the sequence because 103 mod 16 is 7 which is less than 8. - _Indranil Ghosh_, Jan 18 2017
Links
- Indranil Ghosh, Table of n, a(n) for n = 1..10000
Programs
-
Magma
XOR := func; for n in [2 .. 1000] do if IsPrime(n) then pn:=n; if (XOR(pn,8) eq pn+8) then pn; end if; end if; end for;
-
Mathematica
Select[Prime[Range[200]],Mod[#,16]<8&] (* Harvey P. Dale, Jan 11 2018 *)
-
PARI
is_A214588(p)={ !bittest(p,3) & isprime(p) } \\ M. F. Hasler, Jul 24 2012
-
PARI
forprime(p=1,699, bittest(p,3) || print1(p",")) \\ M. F. Hasler, Jul 24 2012
-
Python
from sympy import isprime i=1 while i<=600: if isprime(i)==True and (i%16)<8: print(i, end=", ") i+=1 # Indranil Ghosh, Jan 18 2017
Comments