OFFSET
1,1
LINKS
Seiichi Manyama, Table of n, a(n) for n = 1..10000
MAPLE
q:= n-> numboccur(convert(n, base, 4), 2)=2:
select(q, [$1..350])[]; # Alois P. Heinz, Oct 26 2022
MATHEMATICA
Select[ Range[ 240 ], (Count[ IntegerDigits[ #, 4 ], 2 ]==2)& ]
PROG
(Python)
def ok(n):
mask, c = 3, 0
for i in range(n.bit_length() >> 1):
if (mask&n) >> (i << 1) == 2: c += 1
mask <<= 2
return c == 2
print([k for k in range(227) if ok(k)]) # Michael S. Branicky, Oct 26 2022
CROSSREFS
KEYWORD
nonn,base,easy
AUTHOR
STATUS
approved