login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A225941
Smallest k such that k*6^n-1 is prime
2
1, 2, 2, 2, 2, 3, 5, 13, 3, 19, 5, 2, 3, 28, 12, 2, 15, 19, 19, 20, 7, 13, 5, 3, 4, 2, 2, 7, 42, 7, 4, 7, 5, 34, 8, 2, 78, 13, 12, 2, 3, 24, 4, 12, 2, 37, 30, 5, 2, 28, 12, 2, 2, 35, 59, 58, 15, 65, 82, 28, 32, 60, 10, 48, 8, 14, 23, 5, 32, 18, 3, 80, 28, 12, 2
OFFSET
1,2
COMMENTS
In average k~0.6*n and 0<k<8*n until a proof k may be >8*n
MATHEMATICA
skp[n_]:=Module[{k=1, c=6^n}, While[!PrimeQ[k*c-1], k++]; k]; Array[skp, 80] (* Harvey P. Dale, Jul 22 2013 *)
PROG
(PFGW & SCRIPTIFY)
SCRIPT
DIM n, 0
DIM k
DIMS t
OPENFILEOUT myf, a(n).txt
LABEL a
SET n, n+1
IF n>3000 THEN END
SET k, 0
LABEL b
SET k, k+1
SETS t, %d, %d\,; n; k
PRP k*6^n-1, t
IF ISPRP THEN GOTO c
GOTO b
LABEL c
WRITE myf, t
GOTO a
(PARI) a(n) = my(k=1); while (!isprime(k*6^n-1), k++); k; \\ Michel Marcus, Sep 16 2019
CROSSREFS
Cf. A225911.
Sequence in context: A356758 A098133 A138185 * A138705 A333528 A319187
KEYWORD
nonn
AUTHOR
Pierre CAMI, May 21 2013
STATUS
approved