login
A197918
Pythagorean primes p such that for all primes q < p, p XOR q is not equal to p - q.
2
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,1
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<p p XOR q = p - q. This is a direct result of the binary nature of Mersenne primes being all "1's", smaller numbers XORed with them will return the difference. This sequence is a kind of mirror of that, as for no primes q<p p XOR q = p - 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.
LINKS
Charles R Greathouse IV, Table of n, a(n) for n = 1..303
EXAMPLE
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).
PROG
(Magma)XOR := func<a, b | Seqint([ (adigs[i] + bdigs[i]) mod 2 : i in [1..n]], 2)
where adigs := Intseq(a, 2, n)
where bdigs := Intseq(b, 2, n)
where n := 1 + Ilog2(Max([a, b, 1]))>;
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
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Brad Clardy, Oct 24 2011
STATUS
approved