login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A207459
a(n) is the least number > a(n-1) such that 6*a(n)*prime(n)^2 - 1 and 6*a(n)*prime(n)^2 + 1 are twin primes.
1
3, 5, 7, 12, 13, 18, 27, 28, 43, 47, 58, 133, 168, 170, 192, 195, 223, 230, 308, 348, 365, 370, 373, 385, 417, 443, 468, 532, 737, 742, 875, 917, 1043, 1050, 1063, 1148, 1160, 1170, 1257, 1390, 1435, 1440, 1518, 1547, 1587, 1612, 1617, 1690, 1700, 1725
OFFSET
1,1
COMMENTS
As n increases, a(n)/(n*(log(P(n))^2)) is always near 1.200.
EXAMPLE
6*3*2^2-1=71 , 71 and 73 twin primes so a(1)=3 as prime(1)=2.
6*5*3^2-1=269 269 and 271 twin primes so a(2)=5 as prime(2)=3.
PROG
PFGW64 from Primeform group and Scriptify
Command : PFGW64 -f in.txt
in.txt file :
SCRIPT
DIM nn, 0
DIM kk, 0
DIMS tt
OPENFILEOUT myfile, values.txt
LABEL loopn
SET nn, nn+1
IF nn>50000 THEN END
LABEL loopk
SET kk, kk+1
SETS tt, %d, %d\ ; nn; kk
PRP 6*kk*p(nn)^2-1, tt
IF ISPRP THEN GOTO a
IF ISPRIME THEN GOTO a
GOTO loopk
LABEL a
PRP 6*kk*p(nn)^2+1, tt
IF ISPRP THEN GOTO b
IF ISPRIME THEN GOTO b
GOTO loopk
LABEL b
WRITE myfile, tt
GOTO loopn
CROSSREFS
Cf. A112746.
Sequence in context: A339789 A293598 A243179 * A368036 A241515 A070334
KEYWORD
nonn
AUTHOR
Pierre CAMI, Feb 18 2012
STATUS
approved