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.

A176270 Triangle T(n,m) = 1 + m*(m-n) read by rows, 0 <= m <= n.

Original entry on oeis.org

1, 1, 1, 1, 0, 1, 1, -1, -1, 1, 1, -2, -3, -2, 1, 1, -3, -5, -5, -3, 1, 1, -4, -7, -8, -7, -4, 1, 1, -5, -9, -11, -11, -9, -5, 1, 1, -6, -11, -14, -15, -14, -11, -6, 1, 1, -7, -13, -17, -19, -19, -17, -13, -7, 1, 1, -8, -15, -20, -23, -24, -23, -20, -15, -8, 1
Offset: 0

Views

Author

Roger L. Bagula, Apr 13 2010

Keywords

Comments

For GCD(-1 - m,-1 - n + m) = 1, smallest number that cannot be written as a*(-1 - m) + b*(-1 - n + m) with a and b in the nonnegative integers. - Thomas Anton, May 22 2019

Examples

			Triangle begins
  1;
  1,   1;
  1,   0,   1;
  1,  -1,  -1,   1;
  1,  -2,  -3,  -2,   1;
  1,  -3,  -5,  -5,  -3,   1;
  1,  -4,  -7,  -8,  -7,  -4,   1;
  1,  -5,  -9, -11, -11,  -9,  -5,   1;
  1,  -6, -11, -14, -15, -14, -11,  -6,   1;
  1,  -7, -13, -17, -19, -19, -17, -13,  -7,   1;
  1,  -8, -15, -20, -23, -24, -23, -20, -15,  -8,   1;
		

Crossrefs

Cf. A005586 (row sums), A077028.

Programs

  • GAP
    Flat(List([0..12], n-> List([0..n], k-> k*(k-n)+1 ))); # G. C. Greubel, May 30 2019
  • Magma
    [[k*(k-n)+1: k in [0..n]]: n in [0..12]]; // G. C. Greubel, May 30 2019
    
  • Maple
    A176270 := proc(n,m)
            1+m*(m-n) ;
    end proc: # R. J. Mathar, May 03 2013
  • Mathematica
    Table[k*(k-n)+1, {n,0,12}, {k,0,n}]//Flatten (* modified by G. C. Greubel, May 30 2019 *)
  • PARI
    {T(n,k) = k*(k-n)+1}; \\ G. C. Greubel, May 30 2019
    
  • Sage
    [[k*(k-n)+1 for k in (0..n)] for n in (0..12)] # G. C. Greubel, May 30 2019
    

Formula

T(n,m) = binomial(n-m+1,2) + binomial(m+1,2) - binomial(n+1,2) + 1 = m^2 - n*m + 1.
T(n,m) = T(n,n-m).
T(n,m) = 2 - A077028(n,m) for 0 <= m <= n. - Werner Schulte, Nov 10 2020

Extensions

Edited by R. J. Mathar, May 03 2013