

A112746


Least k such that 6*k*prime(n)^2  1 and 6*k*prime(n)^2 + 1 are twin primes.


4



3, 2, 1, 3, 2, 2, 2, 20, 22, 2, 12, 10, 28, 32, 8, 7, 20, 15, 15, 12, 5, 3, 68, 15, 33, 12, 10, 3, 23, 28, 130, 8, 13, 32, 38, 7, 57, 3, 25, 3, 8, 18, 77, 12, 65, 22, 18, 18, 2, 10, 18, 30, 110, 10, 10, 28, 15, 22, 37, 7, 2, 10, 7, 8, 48, 3, 3, 87, 103, 128, 30
(list;
graph;
refs;
listen;
history;
text;
internal format)



OFFSET

1,1


COMMENTS

Define Sp sum of log(6*prime(n))^2 from n=1 to N. Define Sk sum of k from n=1 to N. As N increases Sk/Sp tends to 0.6.


LINKS

Pierre CAMI, Table of n, a(n) for n = 1..10000


EXAMPLE

6*1*prime(1)^21=23 prime but 25 composite.
6*2*prime(1)^21=47 prime but 49 composite.
6*3*prime(1)^21=71 prime as 73 so a(1)=3.


MATHEMATICA

Table[k = 1; While[c = 6*k*Prime[n]^2; ! PrimeQ[c  1]  ! PrimeQ[c + 1], k++ ]; k, {n, 80}] (* Ray Chandler, Oct 08 2005 *)


PROG

(PFGW64 from Primeform group and SCRIPTIFY)
Command pfgw64 f in.txt
in.txt file :
SCRIPT
DIM nn, 0
DIM kk
DIMS tt
OPENFILEOUT myfile, twin.txt
LABEL loopn
SET nn, nn+1
IF nn>10000 THEN END
SET kk, 0
LABEL loopk
SET kk, kk+1
SETS tt, %d, %d\,; p(nn); kk
PRP 6*kk*p(nn)^21, 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. A112744, A112745.
Sequence in context: A138034 A229216 A087818 * A107460 A152975 A244758
Adjacent sequences: A112743 A112744 A112745 * A112747 A112748 A112749


KEYWORD

nonn,changed


AUTHOR

Pierre CAMI, Sep 18 2005


EXTENSIONS

Extended by Ray Chandler, Oct 08 2005
Corrected, extended and b file by Pierre CAMI, Feb 27 2012


STATUS

approved



