login
Numbers n such that n and n + 12 are prime and there is a power of two in the interval (n, n+12).
1

%I #8 Sep 08 2022 08:46:02

%S 5,7,11,29,31,59,61,127,251,509,1019,1021,262139,1048571,2147483647

%N Numbers n such that n and n + 12 are prime and there is a power of two in the interval (n, n+12).

%C It is a conjecture that this is a finite sequence. A search was conducted out to 2^1500.

%o (Magma)

%o //Program finds primes separated by an even number (called gap) which

%o //have a power of two between them. Program starts with the smallest

%o //power of two above gap. Primes less than this starting point can be

%o //checked by inspection.

%o gap:=12;

%o start:=Ilog2(gap)+1;

%o for i:= start to 1000 do

%o powerof2:=2^i;

%o for k:=powerof2-gap+1 to powerof2-1 by 2 do

%o if (IsPrime(k) and IsPrime(k+gap)) then k;

%o end if;

%o end for;

%o end for;

%Y A046133, A221211.

%K nonn

%O 1,1

%A _Brad Clardy_, Mar 04 2013