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”).

Smallest k such that k*6^n-1 is prime
2

%I #15 Sep 16 2019 10:10:39

%S 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,

%T 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,

%U 15,65,82,28,32,60,10,48,8,14,23,5,32,18,3,80,28,12,2

%N Smallest k such that k*6^n-1 is prime

%C In average k~0.6*n and 0<k<8*n until a proof k may be >8*n

%H Pierre CAMI, <a href="/A225941/b225941.txt">Table of n, a(n) for n = 1..3000</a>

%t skp[n_]:=Module[{k=1,c=6^n},While[!PrimeQ[k*c-1],k++];k]; Array[skp,80] (* _Harvey P. Dale_, Jul 22 2013 *)

%o (PFGW & SCRIPTIFY)

%o SCRIPT

%o DIM n, 0

%o DIM k

%o DIMS t

%o OPENFILEOUT myf, a(n).txt

%o LABEL a

%o SET n, n+1

%o IF n>3000 THEN END

%o SET k, 0

%o LABEL b

%o SET k, k+1

%o SETS t, %d, %d\,; n; k

%o PRP k*6^n-1, t

%o IF ISPRP THEN GOTO c

%o GOTO b

%o LABEL c

%o WRITE myf, t

%o GOTO a

%o (PARI) a(n) = my(k=1); while (!isprime(k*6^n-1), k++); k; \\ _Michel Marcus_, Sep 16 2019

%Y Cf. A225911.

%K nonn

%O 1,2

%A _Pierre CAMI_, May 21 2013