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.

A277949 Triangle read by rows, in which row n gives coefficients in expansion of ((x^n - 1)/(x - 1))^4.

Original entry on oeis.org

1, 1, 4, 6, 4, 1, 1, 4, 10, 16, 19, 16, 10, 4, 1, 1, 4, 10, 20, 31, 40, 44, 40, 31, 20, 10, 4, 1, 1, 4, 10, 20, 35, 52, 68, 80, 85, 80, 68, 52, 35, 20, 10, 4, 1, 1, 4, 10, 20, 35, 56, 80, 104, 125, 140, 146, 140, 125, 104, 80, 56, 35, 20, 10, 4, 1
Offset: 1

Views

Author

Juan Pablo Herrera P., Nov 05 2016

Keywords

Comments

Sum of n-th row is n^4. The n-th row contains 4n-3 entries. Largest coefficients of each row are listed in A005900.
The n-th row is the fourth row of the n-nomial triangle. For example, row 2 (1,4,6,4,1) is the fourth row in the binomial triangle.
T(n,k) gives the number of possible ways of randomly selecting k cards from n-1 sets, each with four different playing cards. It is also the number of lattice paths from (0,0) to (4,k) using steps (1,0), (1,1), (1,2), ..., (1,n-1).

Examples

			Triangle starts:
1;
1, 4, 6, 4, 1;
1, 4, 10, 16, 19, 16, 10, 4, 1;
1, 4, 10, 20, 31, 40, 44, 40, 31, 20, 10, 4, 1;
1, 4, 10, 20, 35, 52, 68, 80, 85, 80, 68, 52, 35, 20, 10, 4, 1;
1, 4, 10, 20, 35, 56, 80, 104, 125, 140, 146, 140, 125, 104, 80, 56, 35, 20, 10, 4, 1.
...
There are T(3,2) = 10 ways to select 2 cards from two sets of four playing cards ABCD, namely, {AA}, {AB}, {AC}, {AD}, {BB}, {BC}, {BD}, {CC}, {CD}, and {DD}.
		

Crossrefs

Programs

  • Mathematica
    Table[CoefficientList[Series[((x^n - 1)/(x - 1))^4, {x, 0, 4 n}], x], {n, 6}] // Flatten (* Michael De Vlieger, Nov 10 2016 *)
  • PARI
    row(n) = Vec(((1 - x^n)/(1 - x))^4);
    tabf(nn) = for (n=1, nn, print(row(n)));

Formula

T(n,k) = Sum_{i=k-n+1..k} A109439(T(n,i)).
T(n,k) = A000292(k+1) = (k+3)!/(k!*6) if 0 =< k < n,
T(n,k) = ((k+3)*(k+2)*(k+1)-4*(k-n+3)*(k-n+2)*(k-n+1))/6 if n =< k < 2*n,
T(n,k) = ((4*n-1-k)*(4*n-2-k)*(4*n-3-k)-4*(3*n-1-k)*(3*n-2-k)*(3*n-3-k))/6 if 2*n-3 =< k < 3*n-3,
T(n,k) = A000292(4*n-3-k) = (4*n-1-k)!/((4*n-4-k)!*6) if 3*n-3 =< k < 4n-3.

A141478 a(n) = binomial(n+2,3)*4^3.

Original entry on oeis.org

64, 256, 640, 1280, 2240, 3584, 5376, 7680, 10560, 14080, 18304, 23296, 29120, 35840, 43520, 52224, 62016, 72960, 85120, 98560, 113344, 129536, 147200, 166400, 187200, 209664, 233856, 259840, 287680, 317440, 349184, 382976, 418880, 456960, 497280, 539904, 584896
Offset: 1

Views

Author

Zerinvary Lajos, Aug 09 2008

Keywords

Crossrefs

Cf. A000292, A035008, A038231 (3rd subdiagonal), A210440.

Programs

  • Magma
    [Binomial(n+2,3)*4^3: n in [1..34]];  // Bruno Berselli, Apr 07 2011
    
  • Magma
    I:=[64, 256, 640, 1280]; [n le 4 select I[n] else 4*Self(n-1)-6*Self(n-2)+4*Self(n-3)-Self(n-4): n in [1..50]]; // Vincenzo Librandi, Jun 29 2012
  • Maple
    seq(binomial(n+2,3)*4^3, n=1..36);
  • Mathematica
    CoefficientList[Series[64/(1-x)^4,{x,0,40}],x] (* Vincenzo Librandi, Jun 29 2012 *)

Formula

G.f.: 64*x/(1-x)^4.
a(n) = 32*n*(n+1)*(n+2)/3 = 64*A000292(n).
a(n) = 4*a(n-1) - 6*a(n-2) + 4*a(n-3) - a(n-4). - Vincenzo Librandi, Jun 29 2012
From Amiram Eldar, Aug 29 2022: (Start)
Sum_{n>=1} 1/a(n) = 3/128.
Sum_{n>=1} (-1)^(n+1)/a(n) = 3*log(2)/16 - 15/128. (End)
From Elmo R. Oliveira, Aug 19 2025: (Start)
E.g.f.: 32*x*(6 + 6*x + x^2)*exp(x)/3.
a(n) = 16*A210440(n). (End)

Extensions

Offset adapted to the g.f. by Bruno Berselli, Apr 07 2011

A354968 Triangle read by rows: T(n, k) = n*k*(n+k)*(n-k)/6.

Original entry on oeis.org

1, 4, 5, 10, 16, 14, 20, 35, 40, 30, 35, 64, 81, 80, 55, 56, 105, 140, 154, 140, 91, 84, 160, 220, 256, 260, 224, 140, 120, 231, 324, 390, 420, 405, 336, 204, 165, 320, 455, 560, 625, 640, 595, 480, 285, 220, 429, 616, 770, 880, 935, 924, 836, 660, 385, 286, 560, 810, 1024
Offset: 2

Views

Author

Ali Sada and Yifan Xie, Jun 14 2022

Keywords

Comments

Given a Pythagorean triple (a,b,c), define S = c^4 - a^4 - b^4. Using Euclid's parameterization (a = 2*n*k, b = n^2 - k^2, c = n^2 + k^2), substituting to get S in terms of n and k gives S = 8*n^2*k^2*((n^2 - k^2))^2, which is a multiple of 288; T(n, k) = sqrt(S/288) = n*k*(n^2 - k^2)/6 = n*k*(n+k)*(n-k)/6.

Examples

			Triangle begins:
  n/k   1    2    3    4    5    6    7
  2     1;
  3     4,   5;
  4    10,  16,  14;
  5    20,  35,  40,  30;
  6    35,  64,  81,  80,  55;
  7    56, 105, 140, 154, 140,  91;
  8    84, 160, 220, 256, 260, 224, 140;
  ...
For n = 3, k = 2, a = 5, b = 12, c = 13. T(3, 2) = sqrt((13^4 - 5^4 - 12^4)/288) = 5.
		

References

  • James J. Tattersall, Elementary Number Theory in Nine Chapters, Cambridge University Press, 1999, Page 72.

Crossrefs

Cf. A120070 (b leg), A055096 (c hypotenuse).
Cf. A006414 (row sums), A000292 (column 1), A077414 (column 2), A000330 (diagonal), A107984 (transpose), A210440 (diagonal which begins with 4).

Programs

  • Mathematica
    T[n_,k_]:=n*k(n^2-k^2)/6; Table[T[n,k],{n,2,11},{k,n-1}]//Flatten (* Stefano Spezia, Jul 11 2025 *)
  • PARI
    apply( {A354968(n, k=0)=k|| k=n-1-(1-n=ceil(sqrt(8*n-7)/2+.5))*(2-n)\2; k*(n-k)*n*(n+k)\6}, [2..66]) \\ M. F. Hasler, May 08 2025

Formula

G.f.: x^2*y*(1 + x*y - 4*x^2*y + x^3*y + x^4*y^2)/((1 - x)^4*(1 - x*y)^4). - Stefano Spezia, Jul 11 2025
Showing 1-3 of 3 results.