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.

A094415 Triangle T read by rows: dot product * .

Original entry on oeis.org

1, 4, 5, 10, 13, 13, 20, 26, 28, 26, 35, 45, 50, 50, 45, 56, 71, 80, 83, 80, 71, 84, 105, 119, 126, 126, 119, 105, 120, 148, 168, 180, 184, 180, 168, 148, 165, 201, 228, 246, 255, 255, 246, 228, 201, 220, 265, 300, 325, 340, 345, 340, 325, 300, 265, 286, 341
Offset: 0

Views

Author

Ralf Stephan, May 02 2004

Keywords

Examples

			Triangle begins as:
   1;
   4,  5;
  10, 13, 13;
  20, 26, 28, 26;
  35, 45, 50, 50, 45;
  56, 71, 80, 83, 80, 71;
		

Crossrefs

Half-diagonal is A050410.
Row sums are A000537.
See also A094414, A088003.

Programs

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

Formula

T(n, k) = n*(n^2 + 3*n*(1+k) + 2 - 3*k^2)/6 for n >= 0, 0 <= k <= n.