login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A045049
Numbers whose base-4 representation contains exactly two 0's and two 2's.
1
130, 136, 160, 266, 290, 296, 386, 392, 416, 518, 521, 523, 526, 530, 536, 545, 547, 548, 556, 562, 568, 578, 584, 608, 641, 643, 644, 652, 656, 688, 706, 712, 736, 778, 802, 808, 898, 904, 928, 1050, 1062, 1065, 1067, 1070
OFFSET
1,1
LINKS
Enrique Pérez Herrero, Table of n, a(n) for n = 1..100000
MATHEMATICA
fQ[n_] := Block[{idn = IntegerDigits[n, 4]}, Count[idn, 0] == Count[idn, 2] == 2]; Select[Range@1100, fQ] (* Robert G. Wilson v, Dec 11 2017 *)
PROG
(Python)
import numpy as np
for a in range(10000):
x = np.base_repr(a, base=4)
if(x.count("0") == 2 and x.count("2") == 2):
print(a)
# Enrique Pérez Herrero, Dec 06 2017
CROSSREFS
Cf. A007090.
Sequence in context: A250740 A025372 A378313 * A163555 A025373 A025364
KEYWORD
nonn,base
STATUS
approved