OFFSET
1,2
COMMENTS
Conjectures: the ratio a(n)/n is always <10 and sum(a(n)/n)/N for n=1 to N tends to 1 as N tends to infinity.
LINKS
Pierre CAMI, Table of n, a(n) for n = 1..4000
MATHEMATICA
sk[n_]:=Module[{c=3^n, k=1}, While[!PrimeQ[(2*k*c+1)2*k*c+1] || Divisible[ k, 3], k++]; k]; Array[sk, 70] (* Harvey P. Dale, Jul 11 2014 *)
PROG
(PFGW & SCRIPT )
SCRIPT
DIM n, 0
DIM i
DIM pp
DIMS t
OPENFILEOUT myf, a(n).txt
LABEL loop1
SET n, n+1
SET i, 0
LABEL loop2
SET i, i+1
SETS t, %d, %d\,; n; i
SET pp, (2*i*3^n+1)*2*i*3^n+1
PRP pp, t
IF ISPRP THEN GOTO a
GOTO loop2
LABEL a
WRITE myf, t
GOTO loop1
(PARI) a(n) = {k = 1; while (! isprime((2*k*3^n+1)*2*k*3^n+1) || !(k % 3), k++); k; } \\ Michel Marcus, May 05 2014
CROSSREFS
KEYWORD
nonn
AUTHOR
Pierre CAMI, May 05 2014
STATUS
approved