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

A214730
Smallest prime q such that 9^n + q*3^n - 1 is prime.
2
3, 3, 3, 3, 13, 19, 43, 3, 61, 13, 29, 11, 5, 53, 73, 53, 23, 17, 229, 13, 3, 3, 17, 149, 5, 239, 5, 13, 223, 71, 3, 11, 31, 73, 97, 43, 11, 83, 149, 277, 311, 383, 127, 11, 3, 31, 233, 61, 61, 13, 73, 107, 613, 137, 53, 367, 467, 53, 233, 277, 17, 53, 109, 449, 151, 97, 13, 281, 103, 233, 193, 23, 7
OFFSET
1,1
PROG
(PFGW and SCRIPTIFY)
SCRIPT
DIM nn, 0
DIM qq
DIMS tt
OPENFILEOUT myfile, a(n).txt
LABEL loopn
SET nn, nn+1
IF nn>4000 THEN END
SET qq, 1
LABEL loopq
SET qq, qq+1
SETS tt, %d, %d\,; nn; p(qq)
PRP (3^nn+p(qq))*3^nn-1, tt
IF ISPRP THEN GOTO a
IF ISPRIME THEN GOTO a
GOTO loopk
LABEL a
WRITE myfile, tt
GOTO loopn
CROSSREFS
Cf. A214700.
Sequence in context: A170858 A024725 A269562 * A153491 A287505 A288124
KEYWORD
nonn
AUTHOR
Pierre CAMI, Jul 27 2012
STATUS
approved