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.

Showing 1-3 of 3 results.

A110206 Row sums of triangle A110205, where A110205(n,k) equals the sum of cubes of numbers < 2^n having exactly k ones in their binary expansion.

Original entry on oeis.org

1, 36, 784, 14400, 246016, 4064256, 66064384, 1065369600, 17112825856, 274341298176, 4393752592384, 70334388633600, 1125625045712896, 18012199553335296, 288212784234102784, 4611545282012774400
Offset: 1

Views

Author

Paul D. Hanna, Jul 16 2005

Keywords

Crossrefs

Cf. A110205 (triangle), A110207 (central terms).

Programs

  • Magma
    [Binomial(2^n,2)^2: n in [1..30]]; // G. C. Greubel, Oct 02 2024
    
  • Mathematica
    Binomial[2^Range[30], 2]^2 (* G. C. Greubel, Oct 02 2024 *)
  • PARI
    a(n)=polcoeff(x*(1+8*x)/((1-4*x)*(1-8*x)*(1-16*x)+x*O(x^n)),n)
    
  • SageMath
    def A110206(n): return binomial(2^n, 2)^2
    [A110206(n) for n in range(1,31)] # G. C. Greubel, Oct 02 2024

Formula

G.f.: x*(1+8*x)/( (1-4*x)*(1-8*x)*(1-16*x) ).
From G. C. Greubel, Oct 02 2024: (Start)
a(n) = ( binomial(2^n, 2) )^2 = 4^(n-1)*(2^n - 1)^2.
E.g.f.: (1/4)*(exp(4*x) - 2*exp(8*x) + exp(16*x)). (End)

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

Original entry on oeis.org

1, 5, 9, 21, 70, 49, 85, 395, 535, 225, 341, 1984, 3906, 3224, 961, 1365, 9429, 24066, 29274, 17241, 3969, 5461, 43434, 135255, 215900, 188595, 86106, 16129, 21845, 196095, 717825, 1412275, 1628175, 1106445, 411995, 65025, 87381, 872788
Offset: 1

Views

Author

Paul D. Hanna, Jul 16 2005

Keywords

Comments

Compare to triangle A110205 (sum of cubes).

Examples

			Row 4 is formed by sums of squares of numbers < 2^4:
T(4,1) = 1^2 + 2^2 + 4^2 + 8^2 = 85;
T(4,2) = 3^2 + 5^2 + 6^2 + 9^2 + 10^2 + 12^2 = 395;
T(4,3) = 7^2 + 11^2 + 13^2 + 14^2 = 535;
T(4,4) = 15^2 = 225.
Triangle begins:
1;
5, 9;
21, 70, 49;
85, 395, 535, 225;
341, 1984, 3906, 3224, 961;
1365, 9429, 24066, 29274, 17241, 3969;
5461, 43434, 135255, 215900, 188595, 86106, 16129;
21845, 196095, 717825, 1412275, 1628175, 1106445, 411995, 65025;
87381, 872788, 3662848, 8541876, 12197570, 10974236, 6095208, 1915228, 261121; ...
Row g.f.s are:
row 1: (1 + 1*x)/(1+x);
row 2: (5 + 9*x);
row 3: (21 + 49*x)*(1+x);
row 4: (85 + 225*x)*(1+x)^2.
G.f. for row n is:
((4^n-1)/3 + (2^n-1)^2*x)*(1+x)^(n-2).
		

Crossrefs

Cf. A110201 (central terms), A002450 (column 1), A110202 (column 2), A110203 (column 3), A110204 (column 4), A016290 (row sums), A110205.

Programs

  • PARI
    T(n,k)=(4^n-1)/3*binomial(n-2,k-1)+(2^n-1)^2*binomial(n-2,k-2)
    for(n=1, 15, for(k=1, n, print1(T(n, k), ", ")); print(""))
    
  • PARI
    /* Using G.f. of A(x,y): */
    T(n,k)=my(X=x+x*O(x^n),Y=y+y*O(y^k));if(n
    				
  • PARI
    /* Sum of Squares of numbers<2^n with k 1-bits: */
    T(n,k)=my(B=vector(n+1));if(n
    				

Formula

T(n,k) = (4^n-1)/3 * C(n-2, k-1) + (2^n-1)^2 * C(n-2, k-2).
G.f.: A(x,y) = x*y*(1-2*x*(1-y)) / ((1-x*(1+y))*(1-2*x*(1+y))*(1-4*x*(1+y))).
G.f. for row n: ((4^n-1)/3 + (2^n-1)^2*x)*(1+x)^(n-2).

A110207 a(n) = sum of cubes of numbers < 2^n having exactly floor(n/2) + 1 ones in their binary expansion.

Original entry on oeis.org

1, 27, 368, 6615, 88536, 1449198, 20078192, 320944275, 4584724120, 72867715074, 1064153845776, 16896536592390, 250629464211504, 3980364331323996, 59709362473177824, 948742244639103915, 14352114907032903000
Offset: 1

Views

Author

Paul D. Hanna, Jul 16 2005

Keywords

Comments

a(n) equals the largest term in row n of triangle A110205.

Crossrefs

Cf. A110205 (triangle), A110206 (row sums).

Programs

  • Magma
    b:= func< n,k | Binomial(n-3, Floor(n/2) - k) >;
    A110207:= func< n | (8^n-1)/7*(b(n,0) - b(n,1)) + (2^n-1)^2*((2^n+1)*b(n,1) + (2^n-1)*b(n,2)) >;
    [A110207(n): n in [1..30]]; // G. C. Greubel, Oct 03 2024
    
  • Mathematica
    b[n_, k_]:= Binomial[n-3, Floor[n/2]-k];
    f[n_]:= (8^n-1)/7*(b[n,0] - b[n,1]) + (2^n-1)^2*((2^n+1)*b[n,1] + (2^n - 1)*b[n,2]);
    A110207[n_]:= If[n<3, f[n]/2, f[n]];
    Table[A110207[n], {n,30}] (* G. C. Greubel, Oct 03 2024 *)
  • PARI
    {a(n)=(8^n-1)/7*binomial(n-3,n\2)+((2^n-1)*(4^n-1)-(8^n-1)/7)*binomial(n-3,n\2-1) +(2^n-1)^3*binomial(n-3,n\2-2)}
    
  • SageMath
    def b(n,k): return binomial(n-3, (n//2) - k)
    def A110207(n): return (8^n-1)/7*(b(n,0) - b(n,1)) + (2^n-1)^2*((2^n+1)*b(n,1) + (2^n-1)*b(n,2))
    [A110207(n) for n in range(1,31)] # G. C. Greubel, Oct 03 2024

Formula

a(n) = (8^n-1)/7*C(n-3, floor(n/2)) + ((2^n-1)*(4^n-1)-(8^n-1)/7)*C(n-3, floor(n/2)-1) + (2^n-1)^3*C(n-3, floor(n/2)-2).
Showing 1-3 of 3 results.