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.

A049780 Array T, read by descending antidiagonals: T(n, k) = k*(2*n + k + 1)/2 for n, k >= 0.

Original entry on oeis.org

0, 1, 0, 3, 2, 0, 6, 5, 3, 0, 10, 9, 7, 4, 0, 15, 14, 12, 9, 5, 0, 21, 20, 18, 15, 11, 6, 0, 28, 27, 25, 22, 18, 13, 7, 0, 36, 35, 33, 30, 26, 21, 15, 8, 0, 45, 44, 42, 39, 35, 30, 24, 17, 9, 0, 55, 54, 52, 49, 45, 40, 34, 27, 19, 10, 0, 66, 65, 63, 60, 56, 51, 45, 38, 30, 21, 11, 0
Offset: 0

Views

Author

Keywords

Comments

Triangle S(n,k) = T(k, n-k), read by rows, is given by S(n,k) = A000217(n) - A000217(k) for n >= 0 and 0 <= k <= n. - Philippe Deléham, Mar 07 2013 [Edited by Petros Hadjicostas, Nov 20 2019]

Examples

			From _Petros Hadjicostas_, Nov 20 2019: (Start)
Rectangular array T(n,k) (with rows n >= 0 and columns k >= 0) begins as follows:
  0, 1,  3,  6, 10, 15, 21, 28, 36, 45,  55, ...
  0, 2,  5,  9, 14, 20, 27, 35, 44, 54,  65, ...
  0, 3,  7, 12, 18, 25, 33, 42, 52, 63,  75, ...
  0, 4,  9, 15, 22, 30, 39, 49, 60, 72,  85, ...
  0, 5, 11, 18, 26, 35, 45, 56, 68, 81,  95, ...
  0, 6, 13, 21, 30, 40, 51, 63, 76, 90, 105, ...
  ... (End)
From _Philippe Deléham_, Mar 07 2013: (Start)
Triangle S(n, k) (with rows n >= 0 and columns k >= 0) begins as follows:
   0;
   1,  0;
   3,  2,  0;
   6,  5,  3,  0;
  10,  9,  7,  4,  0;
  15, 14, 12,  9,  5,  0;
  21, 20, 18, 15, 11,  6,  0;
  28, 27, 25, 22, 18, 13,  7, 0;
  36, 35, 33, 30, 26, 21, 15, 8, 0;
  ... (End)
		

Crossrefs

Diagonal sums are in A000330. See also A049777 (triangle without the zeros).

Programs

  • GAP
    Flat(List([0..15], n-> List([0..n], k-> (n-k)*(n+k+1)/2 ))); # G. C. Greubel, Dec 12 2019
  • Magma
    [(n-k)*(n+k+1)/2: k in [0..n], n in [0..15]]; // G. C. Greubel, Dec 12 2019
    
  • Maple
    seq(seq( (n-k)*(n+k+1)/2, k=0..n), n=0..15); # G. C. Greubel, Dec 12 2019
  • Mathematica
    Table[(n-k)*(n+k+1)/2, {n,0,15}, {k,0,n}]//Flatten (* G. C. Greubel, Dec 12 2019 *)
  • PARI
    T(n,k) = k*(2*n+k+1)/2;
    for(n=0, 15, for(k=0,n, print1(T(k,n-k), ", "))) \\ G. C. Greubel, Dec 12 2019
    
  • Sage
    [[(n-k)*(n+k+1)/2 for k in (0..n)] for n in (0..15)] # G. C. Greubel, Dec 12 2019
    

Formula

T(n,k) = Sum_{j=1..k} (n+j) = k*(2*n + k + 1)/2.
S(n,k) = n*(n+1)/2 - k*(k+1)/2 for n >= 0 and 0 <= k <= n - Philippe Deléham, Mar 07 2013 [Edited by Petros Hadjicostas, Nov 20 2019]
From Stefano Spezia, Dec 13 2019: (Start)
G.f. for T(n,k): y*(1 - x*y)/((1 - x)^2*(1 - y)^3).
E.g.f. for T(n,k): (1/2)*exp(x+y)*y*(2 + 2*x + y). (End)
G.f. for S(n,k): x*(1 - x^2*y)/((1 - x*y)^2*(1 - x)^3). - Petros Hadjicostas, Dec 14 2019