OFFSET
1,3
COMMENTS
In average k~0.6*n and 0 < k < 8*n until a proof that k may be > 8*n.
Dirichlet's theorem proves that a(n) exists for each n. Linnik's theorem gives bounds; in particular the version due to Xylouris gives a(n) << 1855^n. - Charles R Greathouse IV, May 20 2013
LINKS
EXAMPLE
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.
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
(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
(PARI) a(n)=my(k); while(!ispseudoprime(k++*6^n+1), ); k \\ Charles R Greathouse IV, May 20 2013
CROSSREFS
KEYWORD
nonn
AUTHOR
Pierre CAMI, May 20 2013
STATUS
approved