login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
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
EXAMPLE
6*1*prime(1)^2-1=23 prime but 25 composite.
6*2*prime(1)^2-1=47 prime but 49 composite.
6*3*prime(1)^2-1=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)^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
Sequence in context: A138034 A229216 A087818 * A107460 A353298 A152975
KEYWORD
nonn
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

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 25 12:15 EDT 2024. Contains 371969 sequences. (Running on oeis4.)