login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A197918 Pythagorean primes p such that for all primes q < p, p XOR q is not equal to p - q. 2

%I #52 Sep 08 2022 08:45:59

%S 2,5,17,41,73,97,137,193,257,521,577,641,1033,1153,2081,2113,4129,

%T 7681,8353,8737,9281,10369,10753,12289,16417,17921,18433,21569,25601,

%U 32801,32833,36353,37889,38921,39041,40961,50177,53377,65537,131617,133121,136193,139273,139297,139393,147457,163841

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

%C 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.

%C 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.

%C 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.

%H Charles R Greathouse IV, <a href="/A197918/b197918.txt">Table of n, a(n) for n = 1..303</a>

%e 5 is a Pythagorean prime (1^2 + 2^2) and a member since ((5 XOR 2) <> (5 - 2)) and ((5 XOR 3) <> (5 - 3)).

%e 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).

%o (Magma)XOR := func<a, b | Seqint([ (adigs[i] + bdigs[i]) mod 2 : i in [1..n]], 2)

%o where adigs := Intseq(a, 2, n)

%o where bdigs := Intseq(b, 2, n)

%o where n := 1 + Ilog2(Max([a, b, 1]))>;

%o i:=0; k:=0; pn:=0;

%o for n:= 5 to 10000 by 4 do

%o if IsPrime(n) then pn:=n; end if;

%o if (pn eq n) then k:=0;

%o for j in [2 .. n-2] do

%o if IsPrime(j) then pj:=j;

%o if (XOR(pn,pj) ne pn-pj) then i+:=1;

%o else k+:=1;

%o end if;

%o end if;

%o end for;

%o end if;

%o if ((i ne 0) and (k eq 0)) then pn; end if;

%o i:=0; k:=0;

%o end for;

%o (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

%Y Cf. A000668, A057733, A081091, A123250, A140660, A214643.

%K nonn,base

%O 1,1

%A _Brad Clardy_, Oct 24 2011

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 11 20:45 EDT 2024. Contains 372414 sequences. (Running on oeis4.)