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
EXAMPLE
(1*2*3^1-1)*1*2*3^1-1=29 so a(1)=1.
(1*2*3^2-1)*1*2*3^2-1=305 composite, (2*2*3^2-1)*2*2*3^2-1=1259 prime so a(2)=2.
MATHEMATICA
sk[n_]:=Module[{k=1, c=2*3^n}, While[Divisible[k, 3]||!PrimeQ[(k*c-1) (k*c)-1], k++]; k]; Array[sk, 70] (* Harvey P. Dale, Aug 05 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
CROSSREFS
KEYWORD
nonn
AUTHOR
Pierre CAMI, May 04 2014
STATUS
approved