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.

Showing 1-1 of 1 results.

A197918 Pythagorean primes p such that for all primes q < p, p XOR q is not equal to p - q.

Original entry on oeis.org

2, 5, 17, 41, 73, 97, 137, 193, 257, 521, 577, 641, 1033, 1153, 2081, 2113, 4129, 7681, 8353, 8737, 9281, 10369, 10753, 12289, 16417, 17921, 18433, 21569, 25601, 32801, 32833, 36353, 37889, 38921, 39041, 40961, 50177, 53377, 65537, 131617, 133121, 136193, 139273, 139297, 139393, 147457, 163841
Offset: 1

Views

Author

Brad Clardy, Oct 24 2011

Keywords

Comments

It is conjectured that with the exception of the first three terms (2,5,17) all of the terms are a subset of all primes p such that p XOR 22 = p + 22.
If the inequality in the definition is replaced with equality the result are the Mersenne primes A000668, which is equivalent to for all primes q

This sequence is apparently a subset of A081091 Primes of the form 2^i + 2^j + 1, i>j>0, with the added conditions that j <> 1 or 2, and if j can be written as 2n then i cannot be 2n+1. This removes A123250 Primes of form 2^n + 5 (or 2^n + 2^2 +1) for n>0, primes from A140660 3*4^n + 1 (or 2^(2n+1) + 2^(2n) + 1) for n>0, and A057733 Primes of form 2^n + 3 (2^n + 2^1 + 1) for n>1.

Examples

			5 is a Pythagorean prime (1^2 + 2^2) and a member since ((5 XOR 2) <> (5 - 2)) and ((5 XOR 3) <> (5 - 3)).
13 is a Pythagorean prime (2^2 + 3^2) however it is not a member because 5, a prime less than 13, (13 XOR 5) = (13 - 5).
		

Programs

  • Magma
    XOR := func;
    i:=0; k:=0; pn:=0;
    for n:= 5 to 10000 by 4 do
           if IsPrime(n)  then  pn:=n;  end if;
           if (pn eq n) then k:=0;
               for j in [2 .. n-2] do
                    if IsPrime(j)  then pj:=j;
                         if (XOR(pn,pj) ne pn-pj) then i+:=1;
                             else k+:=1;
                         end if;
                    end if;
               end for;
           end if;
           if ((i ne 0) and (k eq 0))  then pn; end if;
           i:=0; k:=0;
    end for;
    
  • PARI
    forprime(p=2,1e6,if(p%4-3==0,next);forprime(q=2,p-1,if(bitxor(p,q)==p-q, next(2)));print1(p", ")) \\ Charles R Greathouse IV, Jul 31 2012
Showing 1-1 of 1 results.