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”).

A079072
Sum of numbers < n having in binary representation the same number of 0's as n.
4
0, 0, 0, 1, 0, 2, 7, 4, 0, 4, 13, 13, 23, 24, 37, 11, 0, 8, 25, 35, 43, 54, 75, 51, 63, 97, 122, 74, 148, 101, 130, 26, 0, 16, 49, 87, 83, 122, 159, 176, 119, 197, 238, 215, 280, 258, 303, 160, 159, 324, 373, 349, 423, 400, 453, 207, 475, 507, 564, 262, 622, 321, 382, 57, 0
OFFSET
0,6
LINKS
MAPLE
f:= n-> add(1-i, i=convert(n, base, 2)):
b:= proc(n) b(n):= b(n-1)+n*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
snbr[n_]:=Module[{dc=DigitCount[n, 2, 0]}, Total[Select[Range[n-1], DigitCount[ #, 2, 0]==dc&]]]; Array[snbr, 70] (* Harvey P. Dale, May 03 2012 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Reinhard Zumkeller, Dec 21 2002
STATUS
approved