login
A242131
Smallest k such that (2*k*3^n-1)*2*k*3^n+1 is prime, with k not divisible by 3.
4
1, 1, 4, 1, 5, 7, 7, 8, 4, 1, 14, 7, 13, 5, 11, 22, 5, 7, 28, 8, 7, 8, 44, 4, 13, 8, 11, 4, 5, 52, 26, 16, 35, 104, 13, 11, 61, 5, 68, 98, 26, 220, 113, 43, 10, 11, 13, 127, 29, 14, 4, 8, 142, 29, 76, 151, 73, 13, 100, 287, 47, 16, 26, 158, 163, 35, 152, 26
OFFSET
1,3
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.
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