OFFSET
0,11
COMMENTS
For n even >2 the least prime is of the form (2^n)*(10^k)+1. For n odd >2 the least prime is of the form (2^n)*(10^k)-1 Mersenne-primes are in the sequence with a(n)=0 and n prime.
EXAMPLE
(2^0)*(10^0)+1 = 2 prime so a(0) = 0.
(2^1)*(10^0)+1 = 3 prime so a(1) = 0.
(2^2)*(10^0)-1 = 3 prime as (2^2)*(10^0)+1 = 5 prime so a(2) = 0.
MATHEMATICA
a[n_] := Module[{k=0}, While[!PrimeQ[2^n*10^k - 1] && !PrimeQ[2^n*10^k + 1], k++]; k]; Array[a, 10, 0] (* Amiram Eldar, Aug 28 2021 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Pierre CAMI, Feb 09 2005
EXTENSIONS
More terms from Amiram Eldar, Aug 28 2021
STATUS
approved