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”).

A213021
Least k such that k*30^n+1 is prime
1
1, 2, 2, 2, 2, 3, 7, 9, 2, 19, 13, 21, 25, 10, 22, 60, 2, 5, 11, 25, 9, 41, 11, 14, 53, 21, 141, 54, 137, 79, 30, 1, 2, 51, 16, 5, 8, 9, 39, 5, 10, 74, 11, 3, 61, 25, 69, 32, 104, 129, 44, 48, 151, 243, 19, 165, 7, 96, 20, 93, 130, 136, 98, 25, 102, 156, 74
OFFSET
1,2
MATHEMATICA
Table[k = 1; While[! PrimeQ[k*30^n + 1], k++]; k, {n, 100}] (* T. D. Noe, Jun 06 2012 *)
PROG
PFGW64 and SCRIPTIFY from Primeform Group
Command : pfgw64 -f in.txt
in.txt file :
SCRIPT
DIM nn, 0
DIM kk
DIMS tt
OPENFILEOUT myfile, a(n).txt
LABEL loopn
SET nn, nn+1
IF nn>2000 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 b
IF ISPRIME THEN GOTO b
GOTO loopk
LABEL b
WRITE myfile, tt
GOTO loopn
(PARI)
a(n)=for(k=1, 10^10, if(isprime(k*30^n+1), return(k)));
vector(66, n, a(n))
/* Joerg Arndt, Jun 03 2012 */
CROSSREFS
Sequence in context: A333528 A319187 A248780 * A078228 A119762 A153667
KEYWORD
nonn
AUTHOR
Pierre CAMI, Jun 03 2012
STATUS
approved