OFFSET
1,3
LINKS
Jinyuan Wang, Table of n, a(n) for n = 1..1500 (terms 1..500 from Nathaniel Johnston)
EXAMPLE
a(1)=0 because (2^1-1)*2^1 - 0 = 2 is prime,
a(2)=1 because (2^2-1)*2^2 - 1 = 11 is prime,
a(3)=3 because (2^3-1)*2^3 - 3 = 53 is prime,
a(4)=1 because (2^4-1)*2^4 - 1 = 239 is prime,
a(5)=1 because (2^5-1)*2^5 - 1 = 991 is prime,
a(6)-5 because (2^6-1)*2^6 - 5 = 4027 is prime.
MAPLE
a := proc(n) local k: for k from 0 do if(isprime((2^n-1)*2^n-k))then return k: fi: od: end: seq(a(n), n=1..69); # Nathaniel Johnston, Jun 14 2011
MATHEMATICA
lk[n_]:=Module[{c=2^n, k=0}, While[!PrimeQ[c(c-1)-k], k++]; k]; Array[lk, 70] (* Harvey P. Dale, Jul 02 2018 *)
PROG
(PARI) a(n) = my(x=(2^n-1)*2^n); x - precprime(x); \\ Michel Marcus, Feb 21 2019
CROSSREFS
KEYWORD
nonn
AUTHOR
Juri-Stepan Gerasimov, Jun 14 2011, Jun 15 2011
STATUS
approved