OFFSET
1,2
LINKS
Pierre CAMI, Table of n, a(n) for n = 1..200
EXAMPLE
1*6^1-1=5 prime
1*6^1+1=7 prime
2*6^1-1=11 prime so a(1)=1
MATHEMATICA
Table[k = 1; While[! (PrimeQ[k*6^n - 1] && PrimeQ[k*6^n + 1] && PrimeQ[2*k*6^n - 1]), k++]; k, {n, 50}] (* T. D. Noe, Jun 06 2012 *)
lk[n_]:=Module[{k=1, c=6^n}, While[!AllTrue[{k*c-1, k*c+1, 2k*c-1}, PrimeQ], k++]; k]; Array[lk, 50] (* The program uses the AllTrue function from Mathematica version 10 *) (* Harvey P. Dale, Jul 29 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>200 THEN END
SET kk, 0
LABEL loopk
SET kk, kk+1
SETS tt, %d, %d\,; nn; kk
PRP kk*6^nn-1, tt
IF ISPRP THEN GOTO a
IF ISPRIME THEN GOTO a
GOTO loopk
LABEL a
PRP kk*6^nn+1, tt
IF ISPRP THEN GOTO b
IF ISPRIME THEN GOTO b
GOTO loopk
LABEL b
PRP 2*kk*6^nn-1, tt
IF ISPRP THEN GOTO c
IF ISPRIME THEN GOTO c
GOTO loopk
LABEL c
WRITE myfile, tt
GOTO loopn
CROSSREFS
KEYWORD
nonn
AUTHOR
Pierre CAMI, Jun 02 2012
STATUS
approved