cp's OEIS Frontend

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.

A079074 Sum of numbers < n having in binary representation the same number of 0's and 1's as n.

This page as a plain text file.
%I A079074 #10 Feb 09 2018 10:40:40
%S A079074 0,0,0,0,0,0,5,0,0,0,9,0,19,11,24,0,0,0,17,0,35,19,40,0,55,62,87,23,
%T A079074 113,50,79,0,0,0,33,0,67,35,72,0,103,110,151,39,193,82,127,0,143,237,
%U A079074 286,173,336,224,277,47,388,331,388,102,446,161,222,0,0,0,65,0,131,67,136,0
%N A079074 Sum of numbers < n having in binary representation the same number of 0's and 1's as n.
%H A079074 Alois P. Heinz, <a href="/A079074/b079074.txt">Table of n, a(n) for n = 0..16383</a>
%p A079074 f:= n-> (x-> (t-> t*(t+1)/2+x[2])(x[1]+x[2]))(add(
%p A079074     `if`(i=0, [1, 0], [0, 1]), i=convert(n, base, 2))):
%p A079074 b:= proc(n) b(n):= b(n-1)+n*x^f(n) end: b(-1):=0:
%p A079074 a:= n-> coeff(b(n-1), x, f(n)):
%p A079074 seq(a(n), n=0..150);  # _Alois P. Heinz_, Feb 08 2018
%t A079074 bdQ[m_,n_]:=Module[{a=DigitCount[m,2,0],b=DigitCount[m,2,1], c= DigitCount[ n,2,0], d=DigitCount[ n,2,1]}, a==c&&b==d]; Table[Total[ Select[Range[n-1],bdQ[#,n]&]],{n,80}] (* _Harvey P. Dale_, Sep 08 2011 *)
%Y A079074 Cf. A079072, A079073, A079071, A007088, A023416, A000120.
%K A079074 nonn
%O A079074 0,7
%A A079074 _Reinhard Zumkeller_, Dec 21 2002