login

Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.

Sequence of pairs k,g with k<3*2^n the smallest such that 3*2^n+k, 3*2^n+k+g, 3*2^n+k+2*g are three consecutive primes in arithmetic progression starting at n=5 as there is not any solution for n<5
1

%I #11 Nov 04 2013 04:17:27

%S 55,6,7,12,173,6,173,6,205,6,229,6,113,6,203,6,95,6,475,6,163,6,119,

%T 12,377,18,1045,6,133,12,551,24,131,12,259,6,1105,42,539,6,1487,18,

%U 1295,12,5,12,289,36,311,36,269,6,2833,6,1813,18,835,6,319,6,587,6,239,30,1225,6,1825,12,973,12,89,30,551,12,1805,30,1039,18,1219,6

%N Sequence of pairs k,g with k<3*2^n the smallest such that 3*2^n+k, 3*2^n+k+g, 3*2^n+k+2*g are three consecutive primes in arithmetic progression starting at n=5 as there is not any solution for n<5

%C The ratio k/n^2 is in average near 0.8 and < 7 for n<701.

%C The ratio g/n^2 is in average near 0.5 and < 4 for n<701.

%C If 3*2^n+k > 10^22 the numbers are probable primes.

%H Pierre CAMI, <a href="/A227856/b227856.txt">Table of n, a(n) for n = 5..1396</a>

%e 3*2^5+55=151, 3*2^5+55+6=157 3*2^5+55*2*6=163

%e 151, 157, 163 three consecutive primes in arithmetic progression 6, so first pair is 55, 6

%o PFGW & SCRIPTIFY

%o SCRIPT

%o DIM i

%o DIM j

%o DIM k

%o DIM n,4

%o DIM pp

%o DIM qq

%o DIM rr

%o DIMS t

%o OPENFILEOUT myf,a(n).txt

%o LABEL loop1

%o SET n,n+1

%o SET i,-1

%o SET j,0

%o SET k,0

%o LABEL a

%o SET i,i+2

%o SETS t,%d,%d\,;n;i

%o SET pp,3*2^n+i

%o PRP pp,t

%o IF ISPRP THEN GOTO b

%o GOTO a

%o LABEL b

%o SET j,j+2

%o SETS t,%d,%d,%d\,;n;i;j

%o SET qq,pp+j

%o PRP qq,t

%o IF ISPRP THEN GOTO c

%o GOTO b

%o LABEL c

%o SET k,k+2

%o SETS t,%d,%d,%d,%d\,;n;i;j;k

%o SET rr,qq+k

%o PRP rr,t

%o IF ISPRP THEN GOTO d

%o GOTO c

%o LABEL d

%o IF j==k THEN GOTO x

%o SET i,i+j

%o SET pp,qq

%o SET j,0

%o SET k,0

%o GOTO b

%o LABEL x

%o WRITE myf,t

%o GOTO loop1

%Y Cf. A230699, A230852

%K nonn

%O 5,1

%A _Pierre CAMI_, Nov 01 2013