OFFSET
1,1
LINKS
Alois P. Heinz, Table of n, a(n) for n = 1..10000
A. Karttunen and J. Moyer, C-program for computing the initial terms of this sequence
MATHEMATICA
Select[Prime[Range[1000]], DigitCount[#, 2, 0] == 2 &]
PROG
(PARI)
{ forprime(p=2, 8000,
v=binary(p); s=0;
for(k=1, #v, s+=if(v[k]==0, +1, 0));
if(s==2, print1(p, ", "))
) }
(Python)
from sympy import isprime
from itertools import combinations, count, islice
def agen(): # generator of terms
for d in count(2):
b = (1<<(d+2))-1
for i, j in combinations(range(d), 2):
if isprime(t:=b-(1<<(d-i))-(1<<(d-j))):
yield t
print(list(islice(agen(), 43))) # Michael S. Branicky, Dec 27 2023
CROSSREFS
KEYWORD
nonn,base,easy
AUTHOR
Antti Karttunen, Jun 01 2004
STATUS
approved