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-2 of 2 results.

A158824 Triangle T(n,k) = A000292(n) if k = 1 otherwise (k-1)*(n-k+1)*(n-k+2)/2, read by rows.

Original entry on oeis.org

1, 4, 1, 10, 3, 2, 20, 6, 6, 3, 35, 10, 12, 9, 4, 56, 15, 20, 18, 12, 5, 84, 21, 30, 30, 24, 15, 6, 120, 28, 42, 45, 40, 30, 18, 7, 165, 36, 56, 63, 60, 50, 36, 21, 8, 220, 45, 72, 84, 84, 75, 60, 42, 24, 9, 286, 55, 90, 108, 112, 105, 90, 70, 48, 27, 10, 364, 66, 110, 135, 144, 140, 126, 105, 80, 54, 30, 11
Offset: 1

Views

Author

Keywords

Comments

The triangle can also be defined by multiplying the triangles A(n,k)=1 and A158823(n,k), that is, this here are the partial column sums of A158823.

Examples

			First few rows of the triangle are:
    1;
    4,  1;
   10,  3,   2;
   20,  6,   6,   3;
   35, 10,  12,   9,   4;
   56, 15,  20,  18,  12,   5;
   84, 21,  30,  30,  24,  15,   6;
  120, 28,  42,  45,  40,  30,  18,   7;
  165, 36,  56,  63,  60,  50,  36,  21,   8;
  220, 45,  72,  84,  84,  75,  60,  42,  24,  9;
  286, 55,  90, 108, 112, 105,  90,  70,  48, 27, 10;
  364, 66, 110, 135, 144, 140, 126, 105,  80, 54, 30, 11;
  455, 78, 132, 165, 180, 180, 168, 147, 120, 90, 60, 33, 12;
  ...
		

Crossrefs

Row sums: A000332.

Programs

  • Magma
    A158824:= func< n,k | k eq 1 select Binomial(n+2,3) else (k-1)*Binomial(n-k+2,2) >; [A158824(n, k): k in [1..n], n in [1..12]]; // G. C. Greubel, Apr 01 2021
    
  • Mathematica
    T[n_, k_]:= If[k==1, Binomial[n+2, 3], (k-1)*Binomial[n-k+2, 2]];
    Table[T[n, k], {n, 12}, {k, n}]//Flatten (* G. C. Greubel, Apr 01 2021 *)
  • Sage
    def A158824(n,k): return binomial(n+2,3) if k==1 else (k-1)*binomial(n-k+2,2)
    flatten([[A158824(n,k) for k in (1..n)] for n in (1..12)]) # G. C. Greubel, Apr 01 2021

Formula

T(n,k) = binomial(n+2,3) if k = 1 otherwise (k-1)*binomial(n-k+2, 2).
Sum_{k=1..n} T(n, k) = binomial(n+3, 4) = A000332(n+3). - G. C. Greubel, Apr 01 2021

A104634 Triangle T(n,k) = (k-1-n)*(k-2-n)*(k+2*n)/6, 1<=k<=n.

Original entry on oeis.org

1, 5, 2, 14, 8, 3, 30, 20, 11, 4, 55, 40, 26, 14, 5, 91, 70, 50, 32, 17, 6, 140, 112, 85, 60, 38, 20, 7, 204, 168, 133, 100, 70, 44, 23, 8, 285, 240, 196, 154, 115, 80, 50, 26, 9, 385, 330, 276, 224, 175, 130, 90, 56, 29, 10, 506, 440, 375, 312, 252, 196, 145, 100, 62, 32, 11, 650, 572, 495, 420, 348, 280, 217, 160, 110, 68, 35, 12, 819, 728, 638, 550, 465, 384
Offset: 1

Views

Author

Gary W. Adamson, Mar 18 2005

Keywords

Examples

			The first few rows are:
1;
5, 2;
14, 8, 3;
30, 20, 11, 4;
55, 40, 26, 14, 5;
91, 70, 50, 32, 17, 6;
...
		

Crossrefs

Cf. A000330 (column 1), A007290 (column 2), A051925 (column 3), A001296 (row sums), A104633, A000332.

Programs

  • Magma
    [[(k-1-n)*(k-2-n)*(k+2*n)/6: k in [1..n]]: n in [1..20]]; // G. C. Greubel, Aug 12 2018
  • Maple
    A104634 := proc(n,k) (k-1-n)*(k-2-n)*(k+2*n)/6 ; end proc:
    seq(seq(A104634(n,k),k=1..n),n=1..15) ; # R. J. Mathar, Aug 31 2011
  • Mathematica
    Table[(k-1-n)*(k-2-n)*(k+2*n)/6, {n, 1, 20}, {k, 1, n}] // Flatten (* G. C. Greubel, Aug 12 2018 *)
  • PARI
    for(n=1,20, for(k=1,n, print1((k-1-n)*(k-2-n)*(k+2*n)/6, ", "))) \\ G. C. Greubel, Aug 12 2018
    

Formula

The triangle is created by the matrix product A002260 * A004736, both infinite lower triangular matrices.

Extensions

Definition in closed form provided by R. J. Mathar, Aug 31 2011
Showing 1-2 of 2 results.