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.

A094414 Triangle T read by rows: dot product <1,2,...,r> * .

Original entry on oeis.org

1, 5, 4, 14, 11, 11, 30, 24, 22, 24, 55, 45, 40, 40, 45, 91, 76, 67, 64, 67, 76, 140, 119, 105, 98, 98, 105, 119, 204, 176, 156, 144, 140, 144, 156, 176, 285, 249, 222, 204, 195, 195, 204, 222, 249, 385, 340, 305, 280, 265, 260, 265, 280, 305, 340, 506, 451, 407, 374, 352, 341, 341, 352, 374, 407, 451
Offset: 0

Views

Author

Ralf Stephan, May 02 2004

Keywords

Comments

Offset for r (the rows) is 1, for s (the columns) it is 0.

Examples

			Triangle begins as:
   1;
   5,  4;
  14, 11, 11;
  30, 24, 22, 24;
  55, 45, 40, 40, 45;
  91, 76, 67, 64, 67, 76;
		

Crossrefs

Row sums are A000537.
See also A094415, A088003.

Programs

  • GAP
    Flat(List([0..12], n-> List([0..n-1], k-> n*((n+1)*(2*n+1) -3*k*(n-k))/6 ))); # G. C. Greubel, Oct 30 2019
  • Magma
    [n*((n+1)*(2*n+1) -3*k*(n-k))/6: k in [0..n-1], n in [0..12]]; // G. C. Greubel, Oct 30 2019
    
  • Maple
    T:=proc(r,s) if s>=r then 0 else r*(2*r^2+3*r+1-3*r*s+3*s^2)/6 fi end: for r from 1 to 11 do seq(T(r,s),s=0..r-1) od; # yields sequence in triangular form # Emeric Deutsch, Nov 27 2006
  • Mathematica
    Table[n*((n+1)*(2*n+1) -3*k*(n-k))/6, {n,0,12}, {k,0,n-1}]//Flatten (* G. C. Greubel, Oct 30 2019 *)
  • PARI
    T(n,k) = n*((n+1)*(2*n+1) -3*k*(n-k))/6;
    for(n=0,12, for(k=0,n-1, print1(T(n,k), ", "))) \\ G. C. Greubel, Oct 30 2019
    
  • Sage
    [[n*((n+1)*(2*n+1) -3*k*(n-k))/6 for k in (0..n-1)] for n in (0..12)] # G. C. Greubel, Oct 30 2019
    

Formula

T(r, s) = r*(2*r^2 + 3*r - 3*r*s + 1 + 3*s^2)/6, r >= 1, 0 <= s <= r-1.

Extensions

More terms from G. C. Greubel, Oct 30 2019