OFFSET
1,2
COMMENTS
FORMULA
a(n) = A162145(n) for n >= 2. - Amiram Eldar, Jul 08 2024
EXAMPLE
a(1) = 0 because neither 0 nor 1 is a prime.
a(2) = 2 because the 2-bit primes are 10_2 = 2 and 11_2 = 3.
a(4) = 2 because the 4-bit primes are 1011_2 = 11 and 1101_2 = 13.
MATHEMATICA
a[n_]:=Sum[Boole[PrimeQ[i]], {i, 2^(n-1), 2^n-1}]; Array[a, 38] (* Stefano Spezia, Jul 07 2024 *
CROSSREFS
KEYWORD
nonn
AUTHOR
Jon E. Schoenfield, Jul 07 2024
STATUS
approved