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.

A143183 Triangle T(n,k) = 1 + (2+n)*abs(n-2*k), read by rows, for 0 <= k <= n.

Original entry on oeis.org

1, 4, 4, 9, 1, 9, 16, 6, 6, 16, 25, 13, 1, 13, 25, 36, 22, 8, 8, 22, 36, 49, 33, 17, 1, 17, 33, 49, 64, 46, 28, 10, 10, 28, 46, 64, 81, 61, 41, 21, 1, 21, 41, 61, 81, 100, 78, 56, 34, 12, 12, 34, 56, 78, 100, 121, 97, 73, 49, 25, 1, 25, 49, 73, 97, 121
Offset: 0

Views

Author

Roger L. Bagula and Gary W. Adamson, Oct 17 2008

Keywords

Examples

			Triangle begins as:
    1;
    4,  4;
    9,  1,  9;
   16,  6,  6, 16;
   25, 13,  1, 13, 25;
   36, 22,  8,  8, 22, 36;
   49, 33, 17,  1, 17, 33, 49;
   64, 46, 28, 10, 10, 28, 46, 64;
   81, 61, 41, 21,  1, 21, 41, 61, 81;
  100, 78, 56, 34, 12, 12, 34, 56, 78, 100;
  121, 97, 73, 49, 25,  1, 25, 49, 73,  97, 121;
		

Crossrefs

Programs

  • Magma
    [1+(n+2)*Abs(n-2*k): k in [0..n], n in [0..12]]; // G. C. Greubel, Apr 23 2024
    
  • Maple
    A143183 := proc(n,k)
            1+(2+n)*abs(n-2*m) ;
    end proc: # R. J. Mathar, Jul 12 2012
  • Mathematica
    T[n_, m_]:= 1 + Abs[(n-m+1)^2 - (m+1)^2];
    Table[T[n, m], {n,0,12}, {m,0,n}]//Flatten
  • SageMath
    flatten([[1+(n+2)*abs(n-2*k) for k in range(n+1)] for n in range(13)]) # G. C. Greubel, Apr 23 2024

Formula

T(n, k) = 1 + (2+n)*abs(n-2*k), for 0 <= k <= n.
T(n, k) = T(n, n-k).
Sum_{k=0..n} T(n, k) = (n+2)*A007590(n+1) + n + 1 (row sums).
From G. C. Greubel, Apr 23 2024: (Start)
T(n, 0) = A000290(n+1).
T(2*n-1, n) = A005843(n+1), n >= 1.
Sum_{k=0..n} (-1)^k*T(n, k) = (1/2)*(1 + (-1)^n)*((n^2 + 3*n + 3) - (-1)^(n/2)*(n + 2)). (End)

Extensions

Row sums corrected by R. J. Mathar, Jul 12 2012