OFFSET
1,3
COMMENTS
We find that 75011 is the only value of n <= 10^5 with a(n) = 0. The least positive integer k with (2^k + k)*75011 - 1 prime is 81152.
LINKS
Zhi-Wei Sun, Table of n, a(n) for n = 1..10000
EXAMPLE
a(3) = 2 since (2^1 + 1) * 3 - 1 = 8 is not prime, but (2^2 + 2) * 3 - 1 = 17 is prime.
MATHEMATICA
Do[Do[If[PrimeQ[(2^k+k)*n-1], Print[n, " ", k]; Goto[aa]], {k, 1, n}]; Print[n, " ", 0]; Label[aa]; Continue, {n, 1, 100}]
lpi[n_]:=Module[{k=1}, While[!PrimeQ[n(2^k+k)-1], k++]; k]; Array[lpi, 100] (* Harvey P. Dale, Aug 10 2019 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Zhi-Wei Sun, Nov 13 2013
STATUS
approved