login
A373990
a(n) = 1 if the binary weight of n is not greater than the 2-adic valuation of 2*n, otherwise 0.
1
1, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 0, 0, 1, 0, 1, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1
OFFSET
1
FORMULA
a(n) = [A000120(n) <= A001511(n)], where [ ] is the Iverson bracket.
MATHEMATICA
A373990[n_] := Boole[DigitCount[n, 2, 1] <= IntegerExponent[n, 2] + 1];
Array[A373990, 100] (* Paolo Xausa, Jul 01 2024 *)
PROG
(PARI) A373990(n) = (hammingweight(n) <= (1+valuation(n, 2)));
CROSSREFS
Characteristic function of A371176.
Sequence in context: A322860 A353766 A178225 * A264739 A373252 A257170
KEYWORD
nonn
AUTHOR
Antti Karttunen, Jun 30 2024
STATUS
approved