This site is supported by donations to The OEIS Foundation.

 Please make a donation to keep the OEIS running. We are now in our 55th year. In the past year we added 12000 new sequences and reached 8000 citations (which often say "discovered thanks to the OEIS"). We need to raise money to hire someone to manage submissions, which would reduce the load on our editors and speed up editing. Other ways to donate

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A212955 Least k such that k*30^n-1 and k*30^n+1 are twin primes. 2
 1, 7, 19, 44, 52, 19, 8, 77, 82, 40, 14, 140, 44, 119, 592, 217, 272, 744, 737, 536, 1298, 219, 839, 977, 226, 773, 576, 1111, 461, 130, 104, 1152, 2083, 721, 587, 6312, 2126, 489, 331, 6008, 4582, 420, 14, 3951, 432, 2703, 4498, 2219, 1029, 1411, 2392, 3431 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,2 LINKS Pierre CAMI, Table of n, a(n) for n = 1..270 EXAMPLE 1*30^1-1 = 29 is prime and 1*30^1+1 = 31 is prime. Hence a(1) = 1. MATHEMATICA Table[k = 1; While[! PrimeQ[k*30^n + 1] || ! PrimeQ[k*30^n - 1], k++]; k, {n, 60}] (* T. D. Noe, Jun 01 2012 *) tpk[n_]:=Module[{k=1, c=30^n}, While[!AllTrue[k*c+{1, -1}, PrimeQ], k++]; k]; Array[tpk, 60] (* The program uses the AllTrue function from Mathematica version 10 *) (* Harvey P. Dale, Mar 26 2015 *) PROG PFGW64 and SCRIPTIFY from Primeform Group command : pfgw64 -f in.txt in.txt file : SCRIPT DIM nn, 0 DIM kk, 0 DIMS tt OPENFILEOUT myfile, a(n).txt LABEL loopn SET nn, nn+1 IF nn>270 THEN END SET kk, 0 LABEL loopk SET kk, kk+1 SETS tt, %d, %d\,; nn; kk PRP kk*30^nn-1, tt IF ISPRP THEN GOTO a IF ISPRIME THEN GOTO a GOTO loopk LABEL a PRP kk*30^nn+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: A113927 A155399 A268926 * A155415 A155273 A277613 Adjacent sequences:  A212952 A212953 A212954 * A212956 A212957 A212958 KEYWORD nonn AUTHOR Pierre CAMI, Jun 01 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 | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

Last modified December 13 09:54 EST 2019. Contains 329968 sequences. (Running on oeis4.)