login
A242133
Smallest k such that (2*k*3^n+1)*2*k*3^n+1 is prime, with k not divisible by 3.
4
1, 5, 1, 1, 5, 7, 1, 13, 2, 1, 1, 7, 37, 5, 1, 5, 16, 68, 28, 82, 17, 40, 5, 5, 44, 17, 2, 26, 8, 13, 25, 13, 31, 35, 65, 61, 28, 23, 7, 35, 43, 49, 64, 5, 29, 29, 95, 26, 4, 68, 7, 29, 49, 46, 37, 14, 29, 1, 166, 20, 23, 47, 52, 106, 2, 4, 197, 14, 133, 29
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.
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