login
A227856
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
55, 6, 7, 12, 173, 6, 173, 6, 205, 6, 229, 6, 113, 6, 203, 6, 95, 6, 475, 6, 163, 6, 119, 12, 377, 18, 1045, 6, 133, 12, 551, 24, 131, 12, 259, 6, 1105, 42, 539, 6, 1487, 18, 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
OFFSET
5,1
COMMENTS
The ratio k/n^2 is in average near 0.8 and < 7 for n<701.
The ratio g/n^2 is in average near 0.5 and < 4 for n<701.
If 3*2^n+k > 10^22 the numbers are probable primes.
EXAMPLE
3*2^5+55=151, 3*2^5+55+6=157 3*2^5+55*2*6=163
151, 157, 163 three consecutive primes in arithmetic progression 6, so first pair is 55, 6
PROG
PFGW & SCRIPTIFY
SCRIPT
DIM i
DIM j
DIM k
DIM n, 4
DIM pp
DIM qq
DIM rr
DIMS t
OPENFILEOUT myf, a(n).txt
LABEL loop1
SET n, n+1
SET i, -1
SET j, 0
SET k, 0
LABEL a
SET i, i+2
SETS t, %d, %d\,; n; i
SET pp, 3*2^n+i
PRP pp, t
IF ISPRP THEN GOTO b
GOTO a
LABEL b
SET j, j+2
SETS t, %d, %d, %d\,; n; i; j
SET qq, pp+j
PRP qq, t
IF ISPRP THEN GOTO c
GOTO b
LABEL c
SET k, k+2
SETS t, %d, %d, %d, %d\,; n; i; j; k
SET rr, qq+k
PRP rr, t
IF ISPRP THEN GOTO d
GOTO c
LABEL d
IF j==k THEN GOTO x
SET i, i+j
SET pp, qq
SET j, 0
SET k, 0
GOTO b
LABEL x
WRITE myf, t
GOTO loop1
CROSSREFS
KEYWORD
nonn
AUTHOR
Pierre CAMI, Nov 01 2013
STATUS
approved