login
A039279
Numbers whose base-4 representation has the same nonzero number of 0's and 3's.
1
12, 19, 28, 35, 44, 49, 50, 52, 56, 71, 75, 77, 78, 83, 92, 99, 108, 113, 114, 116, 120, 135, 139, 141, 142, 147, 156, 163, 172, 177, 178, 180, 184, 195, 197, 198, 201, 202, 204, 209, 210, 212, 216, 225, 226, 228, 232, 240, 271, 279, 283, 285, 286, 295, 299
OFFSET
1,1
MATHEMATICA
Select[Range[300], DigitCount[#, 4, 0]==DigitCount[#, 4, 3]>0&] (* Harvey P. Dale, Oct 30 2021 *)
PROG
(Python)
from sympy.ntheory import count_digits
def ok(n): c = count_digits(n, 4); return c[0] == c[3] > 0
print([k for k in range(300) if ok(k)]) # Michael S. Branicky, Dec 19 2021
CROSSREFS
Cf. A007090.
Supersequence of A045067.
Sequence in context: A291939 A349986 A043102 * A045067 A043882 A205718
KEYWORD
nonn,base,easy
STATUS
approved