This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A079073 #16 Nov 07 2020 05:31:46 %S A079073 0,0,1,0,3,3,8,0,7,14,23,7,33,18,31,0,15,45,62,45,80,64,85,15,100,107, %T A079073 132,38,158,65,94,0,31,124,157,186,191,221,258,124,227,296,337,163, %U A079073 379,206,251,31,267,423,472,297,522,348,401,78,574,455,512,133,570,192,253,0,63 %N A079073 Sum of numbers < n having in binary representation the same number of 1's as n. %H A079073 Alois P. Heinz, <a href="/A079073/b079073.txt">Table of n, a(n) for n = 0..16383</a> %p A079073 f:= n-> add(i, i=convert(n, base, 2)): %p A079073 b:= proc(n) b(n):= b(n-1)+n*x^f(n) end: b(-1):=0: %p A079073 a:= n-> coeff(b(n-1), x, f(n)): %p A079073 seq(a(n), n=0..150); # _Alois P. Heinz_, Feb 08 2018 %t A079073 a[n_] := Module[{dc = DigitCount[n, 2, 1]}, Select[Range[n-1], DigitCount[#, 2, 1] == dc&] // Total]; %t A079073 a /@ Range[0, 100] (* _Jean-François Alcover_, Nov 07 2020 *) %o A079073 (PARI) a(n) = my(s=hammingweight(n)); sum(k=1, n-1, if (s==hammingweight(k), k)); \\ _Michel Marcus_, Nov 07 2020 %Y A079073 Cf. A079072, A079074, A068076, A007088, A000120. %K A079073 nonn,look,base %O A079073 0,5 %A A079073 _Reinhard Zumkeller_, Dec 21 2002