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.

A214588 Primes p such that p mod 16 < 8.

Original entry on oeis.org

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

Views

Author

Brad Clardy, Jul 22 2012

Keywords

Comments

Original definition: Primes p such that p XOR 8 = p + 8.
This is an example of a class of primes p such that p XOR n = p + n.
A002144 is the case where n=2, there are no cases where n=3, in A033203 n=4, 2 is the only p for n=5, in A007519 n=6, there are no cases where n=7. This sequence occurs when n=8.
In general if n is an odd number in A004767 there are no primes, if n is an odd number in A016813, then 2 is the only prime, and if n is an even number (A005843) there is a set of primes that satisfies the relationship p XOR n = p + n.

Examples

			103 is in the sequence because 103 mod 16 is 7 which is less than 8. - _Indranil Ghosh_, Jan 18 2017
		

Crossrefs

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