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.

A110202 a(n) = sum of squares of numbers < 2^n having exactly 2 ones in their binary representation.

This page as a plain text file.
%I A110202 #5 Jan 27 2013 15:46:16
%S A110202 0,9,70,395,1984,9429,43434,196095,872788,3842729,16773118,72693075,
%T A110202 313158312,1342144509,5726557522,24338016935,103078952956,
%U A110202 435222828369,1832518331046,7696579297275,32252336887120,134873417951909
%N A110202 a(n) = sum of squares of numbers < 2^n having exactly 2 ones in their binary representation.
%C A110202 Equals column 2 of triangle A110200.
%H A110202 Harvey P. Dale, <a href="/A110202/b110202.txt">Table of n, a(n) for n = 1..1000</a>
%F A110202 G.f.: x^2*(9-38*x+32*x^2)/( (1-x)^2*(1-2*x)*(1-4*x)^2 ). a(n) = Sum_{k|A018900(k)<2^n} A018900(k)^2.
%e A110202 For n=4, the sum of the squares of numbers < 2^4
%e A110202 having exactly 2 ones in their binary digits is:
%e A110202 a(4) = 3^2 + 5^2 + 6^2 + 9^2 + 10^2 + 12^2 = 395.
%t A110202 nn=30;With[{c=Union[FromDigits[#,2]&/@(Flatten[Table[Join[ {1},#]&/@ Permutations[Join[{1},PadRight[{},n,0]]],{n,0,nn}],1])]}, Table[ Total[ Select[c,#<2^n&]^2],{n,nn}]] (* _Harvey P. Dale_, Jan 27 2013 *)
%o A110202 (PARI) a(n)=polcoeff(x^2*(9-38*x+32*x^2)/((1-x)^2*(1-2*x)*(1-4*x)^2+x*O(x^n)),n)
%Y A110202 Cf. A110200 (triangle), A110201 (central terms), A002450 (column 1), A110203 (column 3), A110204 (column 4), A018900.
%K A110202 nonn
%O A110202 1,2
%A A110202 _Paul D. Hanna_, Jul 16 2005