OFFSET
1,1
LINKS
Pierre CAMI, Table of n, a(n) for n = 1..4000
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
KEYWORD
nonn
AUTHOR
Pierre CAMI, Jul 27 2012
STATUS
approved