login
A045015
Numbers whose base-4 representation contains no 0's and exactly two 1's.
1
5, 22, 23, 25, 29, 37, 53, 90, 91, 94, 95, 102, 103, 105, 109, 118, 119, 121, 125, 150, 151, 153, 157, 165, 181, 214, 215, 217, 221, 229, 245, 362, 363, 366, 367, 378, 379, 382, 383, 410, 411, 414, 415, 422, 423, 425, 429, 438
OFFSET
1,1
LINKS
MATHEMATICA
Select[Range[10000], DigitCount[#, 4, 0] == 0 && DigitCount[#, 4, 1] == 2 &] (* Vincenzo Librandi, Sep 21 2016 *)
PROG
(Python)
from sympy.ntheory import count_digits
def ok(n): c = count_digits(n, 4); return 0 not in c and c[1] == 2
print(list(filter(ok, range(439)))) # Michael S. Branicky, May 22 2021
CROSSREFS
Cf. A007090.
Sequence in context: A217444 A063619 A229801 * A283758 A288676 A085101
KEYWORD
nonn,base
STATUS
approved