A225911 Smallest k such that k*6^n+1 is prime.
1, 1, 2, 1, 10, 3, 3, 3, 12, 2, 2, 15, 17, 11, 3, 8, 2, 10, 12, 2, 73, 35, 21, 11, 18, 3, 12, 2, 3, 28, 48, 8, 11, 31, 17, 102, 17, 7, 17, 8, 2, 35, 13, 135, 33, 72, 12, 2, 18, 3, 26, 17, 38, 16, 51, 12, 2, 2, 2, 40, 103, 45, 26, 40, 16, 3, 10, 26, 10, 8, 2, 11
Offset: 1
Keywords
Examples
6^1+1=7 is prime, so a(1)=1; 6^2+1=37 is prime, so a(2)=1; 6^3+1=217 is composite, 2*6^3+1=433 is prime, so a(3)=2.
Links
Programs
-
Magma
S:=[]; for n in [1..100] do k:=1; while not IsPrime(k*6^n+1) do k:=k+1; end while; Append(~S, k); end for; S; // Bruno Berselli, May 20 2013
-
Mathematica
skp[n_]:=Module[{k=1,c=6^n},While[!PrimeQ[k*c+1],k++];k]; Array[skp,80] (* Harvey P. Dale, Jun 17 2025 *)
-
PARI
a(n)=my(k);while(!ispseudoprime(k++*6^n+1),);k \\ Charles R Greathouse IV, May 20 2013
Comments