OFFSET
0,13
LINKS
Alois P. Heinz, Table of n, a(n) for n = 0..16383
MAPLE
f:= n-> (x-> (t-> t*(t+1)/2+x[2])(x[1]+x[2]))(add(
`if`(i=0, [1, 0], [0, 1]), i=convert(n, base, 2))):
b:= proc(n) b(n):= b(n-1)+x^f(n) end: b(-1):=0:
a:= n-> coeff(b(n-1), x, f(n)):
seq(a(n), n=0..150); # Alois P. Heinz, Feb 08 2018
MATHEMATICA
a[n_] := Count[Range[n-1], k_ /; DigitCount[n, 2] == DigitCount[k, 2]];
Table[a[n], {n, 0, 104}] (* Jean-François Alcover, Feb 13 2018 *)
CROSSREFS
KEYWORD
nonn,look
AUTHOR
Reinhard Zumkeller, Dec 21 2002
STATUS
approved