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.

A110205 Triangle, read by rows, where T(n,k) equals the sum of cubes of numbers < 2^n having exactly k ones in their binary expansion.

This page as a plain text file.
%I A110205 #18 Oct 05 2024 09:40:24
%S A110205 1,9,27,73,368,343,585,3825,6615,3375,4681,36394,88536,86614,29791,
%T A110205 37449,332883,1024002,1449198,970677,250047,299593,2979420,10970133,
%U A110205 20078192,19714083,9974580,2048383,2396745,26298405,112122225,250021125,320944275,239783895,97221555,16581375
%N A110205 Triangle, read by rows, where T(n,k) equals the sum of cubes of numbers < 2^n having exactly k ones in their binary expansion.
%C A110205 Compare to triangle A110200 (sum of squares).
%H A110205 Paul D. Hanna, <a href="/A110205/b110205.txt">Rows n = 1..45, flattened.</a>
%F A110205 T(n, k) = (8^n-1)/7*C(n-3, k-1) + ((2^n-1)*(4^n-1)-(8^n-1)/7)*C(n-3, k-2) + (2^n-1)^3*C(n-3, k-3).
%F A110205 G.f. for row n: ((8^n-1)/7 + ((2^n-1)*(4^n-1)-(8^n-1)/7)*x + (2^n-1)^3*x^2)*(1+x)^(n-3).
%e A110205 Row 4 is formed by sums of cubes of numbers < 2^4:
%e A110205   T(4,1) = 1^3 + 2^3 + 4^3 + 8^3 = 585;
%e A110205   T(4,2) = 3^3 + 5^3 + 6^3 + 9^3 + 10^3 + 12^3 = 3825;
%e A110205   T(4,3) = 7^3 + 11^3 + 13^3 + 14^3 = 6615;
%e A110205   T(4,4) = 15^3 = 3375.
%e A110205 Triangle begins:
%e A110205         1;
%e A110205         9,       27;
%e A110205        73,      368,       343;
%e A110205       585,     3825,      6615,      3375;
%e A110205      4681,    36394,     88536,     86614,     29791;
%e A110205     37449,   332883,   1024002,   1449198,    970677,    250047;
%e A110205    299593,  2979420,  10970133,  20078192,  19714083,   9974580,  2048383;
%e A110205   2396745, 26298405, 112122225, 250021125, 320944275, 239783895, 97221555, 16581375; ...
%e A110205 Row g.f.s are:
%e A110205   row 1: (1 + 2*x + 1*x^2)/(1+x)^2;
%e A110205   row 2: (9 + 36*x + 27*x^2)/(1+x);
%e A110205   row 3: (73 + 368*x + 343*x^2);
%e A110205   row 4: (585 + 3240*x + 3375*x^2)*(1+x).
%e A110205 G.f. for row n is:
%e A110205   ((8^n-1)/7 + ((2^n-1)*(4^n-1)-(8^n-1)/7)*x + (2^n-1)^3*x^2)*(1+x)^(n-3).
%t A110205 b[n_, k_]= Binomial[n-3, k];
%t A110205 T[n_, k_]:= (8^n-1)/7*(b[n,k-1] -b[n,k-2]) + (2^n-1)^2*((2^n+1)*b[n,k-2] + (2^n-1)*b[n,k-3]);
%t A110205 A110205[n_, k_]:= If[n<3, T[n,k]/2, T[n,k]];
%t A110205 Table[A110205[n,k], {n,12}, {k,n}]//Flatten (* _G. C. Greubel_, Oct 03 2024 *)
%o A110205 (PARI) T(n,k)=(8^n-1)/7*binomial(n-3,k-1)+((2^n-1)*(4^n-1)-(8^n-1)/7)*binomial(n-3,k-2) +(2^n-1)^3*binomial(n-3,k-3)
%o A110205 (PARI) /* Sum of cubes of numbers<2^n with k 1-bits: */
%o A110205 T(n,k)=local(B=vector(n+1));if(n<k || k<1,0, for(m=1,2^n-1, B[1+sum(i=1,#binary(m),(binary(m))[i])]+=m^3);B[k+1])
%o A110205 (Magma)
%o A110205 b:= func< n,k | Binomial(n-3, k) >;
%o A110205 A110205:= func< n,k | (8^n-1)/7*(b(n,k-1) -b(n,k-2)) +(2^n-1)^2*((2^n+1)*b(n,k-2) +(2^n-1)*b(n,k-3)) >;
%o A110205 [A110205(n,k): k in [1..n], n in [1..12]]; // _G. C. Greubel_, Oct 03 2024
%o A110205 (SageMath)
%o A110205 def b(n,k): return binomial(n-3, k)
%o A110205 def A110205(n,k): return (8^n-1)/7*(b(n,k-1) - b(n,k-2)) + (2^n-1)^2*((2^n+1)*b(n,k-2) + (2^n-1)*b(n,k-3))
%o A110205 flatten([[A110205(n,k) for k in range(1,n+1)] for n in range(1,13)]) # _G. C. Greubel_, Oct 03 2024
%Y A110205 Cf. A110206 (row sums), A110207 (central terms), A023001 (column 1).
%K A110205 nonn,tabl
%O A110205 1,2
%A A110205 _Paul D. Hanna_, Jul 16 2005