OFFSET
1,2
COMMENTS
As n increases k is on average 1.43*n.
LINKS
Pierre CAMI, Table of n, a(n) for n = 1..3867
EXAMPLE
4^1+2^1-1=5 prime so a(1)=1.
4^2+2^2-1=19 prime so a(2)=2.
4^3+2^3-1=71 prime so a(3)=3.
MATHEMATICA
Table[k = n; While[! PrimeQ[4^n + 2^k - 1], k++]; k, {n, 100}] (* T. D. Noe, May 16 2012 *)
PROG
(PFGW64 and SCRIPTIFY)
Command : PFGW64 -f in.txt
in.txt file :
SCRIPT
DIM nn, 0
DIM kk
DIMS tt
OPENFILEOUT myfile, a(n).txt
LABEL loopn
SET nn, nn+1
SET kk, nn-1
LABEL loopk
SET kk, kk+1
SETS tt, %d, %d\,; nn; kk
PRP 4^nn+2^kk-1, tt
IF ISPRP THEN GOTO a
IF ISPRIME THEN GOTO a
GOTO loopk
LABEL a
WRITE myfile, tt
GOTO loopn
CROSSREFS
KEYWORD
nonn
AUTHOR
Pierre CAMI, May 10 2012
EXTENSIONS
Missing a(2103) inserted into b-file by Andrew Howroyd, Feb 24 2018
STATUS
approved