A220746
Numbers n such that n and n + 10 are prime and there is a power of two in the interval (n, n+10).
Original entry on oeis.org
3, 7, 13, 31, 61, 127, 1021, 1048573, 23945242826029513411849172299223580994042798784118781
Offset: 1
-
//Program finds primes separated by an even number (called gap) which
//have a power of two between them. Program starts with the smallest
//power of two above gap. Primes less than this starting point can be
//checked by inspection. In this example 3 also works.
gap:=10;
start:=Ilog2(gap)+1;
for i:= start to 1000 do
powerof2:=2^i;
for k:=powerof2-gap+1 to powerof2-1 by 2 do
if (IsPrime(k) and IsPrime(k+gap)) then k;
end if;
end for;
end for;
-
Union[Flatten[Table[Select[Range[2^n - 9, 2^n - 1, 2], PrimeQ[#] && PrimeQ[# + 10] &], {n, 3, 200}]]] (* T. D. Noe, Feb 20 2013 *)
Union[Flatten[Table[Select[Thread[{Range[2^n-10,2^n],Range[ 2^n,2^n+10]}],AllTrue[ #,PrimeQ]&],{n,3,1000}],1][[;;,1]]] (* Harvey P. Dale, Feb 19 2023 *)
-
print1(3); for(n=4,500,forprime(p=2^n-9,2^n-1,if(isprime(p+10), print1(", "p)))) \\ Charles R Greathouse IV, Feb 20 2013
A220951
Primes p such that p+6 is also prime and there is a power of two in the interval (p,p+6).
Original entry on oeis.org
5, 7, 11, 13, 31, 61, 251, 4093
Offset: 1
A222227
Numbers n such that n and n + 16 are prime and there is a power of two in the interval (n,n+16).
Original entry on oeis.org
3, 7, 13, 31, 241, 65521, 1048573, 2305843009213693951
Offset: 1
A213210
Numbers n such that n and n + 8 are prime and there is a power of two in the interval (n,n+8).
Original entry on oeis.org
3, 5, 11, 29, 59, 4091, 262139
Offset: 1
-
//Program finds primes separated by an even number (called gap) which
//have a power of two between them. The program starts with the smallest
//power of two above gap. Primes less than this starting point can be
//checked inspection. In this example 3 and 5 also work.
gap:=8;
start:=Ilog2(gap)+1;
for i:= start to 1000 do
powerof2:=2^i;
for k:=powerof2-gap+1 to powerof2-1 by 2 do
if (IsPrime(k) and IsPrime(k+gap)) then k;
end if;
end for;
end for;
-
[n: n in PrimesUpTo(10^6) | IsPrime(n+8) and exists{t: t in [n+1..n+7 by 2] | IsOne(t/2^Valuation(t,2))}]; // Bruno Berselli, May 16 2013
A213677
Numbers n such that n and n + 12 are prime and there is a power of two in the interval (n, n+12).
Original entry on oeis.org
5, 7, 11, 29, 31, 59, 61, 127, 251, 509, 1019, 1021, 262139, 1048571, 2147483647
Offset: 1
A222219
Numbers n such that n and n + 18 are prime and there is a power of two in the interval (n,n+18).
Original entry on oeis.org
5, 11, 13, 19, 23, 29, 53, 61, 113, 239, 251, 503, 1013, 1021, 4093, 8191, 65519, 65521, 262133, 1048571, 4194301, 302231454903657293676533
Offset: 1
-
//Program finds primes separated by an even number (called gap) which
//have a power of two between them. Program starts with the smallest
//power of two above gap. Primes less than this starting point can be
//checked by inspection.
gap:=18;
start:=Ilog2(gap)+1;
for i:= start to 1000 do
powerof2:=2^i;
for k:=powerof2-gap+1 to powerof2-1 by 2 do
if (IsPrime(k) and IsPrime(k+gap)) then k;
end if;
end for;
end for;
-
Flatten[Table[Select[2^n-Range[17],AllTrue[{#,#+18},PrimeQ]&],{n,4,80}]]// Sort (* The program uses the AllTrue function from Mathematica version 10 *) (* Harvey P. Dale, Oct 04 2019 *)
A222424
Numbers n such that n and n + 14 are prime and there is a power of two in the interval (n,n+14).
Original entry on oeis.org
3, 5, 23, 29, 53, 59, 509, 1019, 2039, 262133, 262139, 536870909, 73786976294838206459, 2787593149816327892691964784081045188247543
Offset: 1
Showing 1-7 of 7 results.
Comments