OFFSET
1,5
LINKS
Michael S. Branicky, Table of n, a(n) for n = 1..1000
A. Karttunen and J. Moyer, C-program for computing the initial terms of this sequence
Samuel S. Wagstaff, Jr., Prime Numbers with a fixed number of one bits or zero bits in their binary representation, Exp. Math. vol. 10, issue 2 (2001) 267, Table 4. - From N. J. A. Sloane, Jun 19 2011.
PROG
(Python)
from sympy import isprime
from itertools import combinations, count, islice
def a(n): # generator of terms
if n < 2: return 0
b, d = (1<<n+1)-1, n-1
return sum(1 for i, j in combinations(range(d), 2) if isprime(b-(1<<(d-i))-(1<<(d-j))))
print([a(n) for n in range(1, 100)]) # Michael S. Branicky, Dec 27 2023
CROSSREFS
KEYWORD
base,nonn
AUTHOR
Antti Karttunen, Jun 01 2004
EXTENSIONS
Added terms a(34)-a(99) from the Wagstaff paper. - N. J. A. Sloane, Jun 19 2011
STATUS
approved