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.

A257564 Irregular triangle read by rows: T(n,k) = r(n+k)+r(n-k) with r(n) = (n-(n mod 2))/2 for n>=0 and -n<=k<=n.

Original entry on oeis.org

0, 1, 0, 1, 2, 1, 2, 1, 2, 3, 2, 3, 2, 3, 2, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 5, 4, 5, 4, 5, 4, 5, 4, 5, 4, 5, 6, 5, 6, 5, 6, 5, 6, 5, 6, 5, 6, 5, 6, 7, 6, 7, 6, 7, 6, 7, 6, 7, 6, 7, 6, 7, 6, 7, 8, 7, 8, 7, 8, 7, 8, 7, 8, 7, 8, 7, 8, 7, 8, 7, 8
Offset: 0

Views

Author

Peter Luschny, May 28 2015

Keywords

Comments

r(n+k)-r(n-k) is triangle A196199(n,k).

Examples

			Triangle starts:
                 0;
              1, 0, 1;
           2, 1, 2, 1, 2;
        3, 2, 3, 2, 3, 2, 3;
     4, 3, 4, 3, 4, 3, 4, 3, 4;
  5, 4, 5, 4, 5, 4, 5, 4, 5, 4, 5;
		

Crossrefs

Programs

  • Maple
    r := n -> (n-(n mod 2))/2: T := (n,k) -> r(n+k) + r(n-k):
    seq(print(seq(T(n,k), k=-n..n)), n=0..6);
  • Sage
    for n in (0..6):
        [(n+k)//2 + (n-k)//2 for k in (-n..n)]

Formula

Sum_{k=-n..n} T(n,k) = 2*n^2 = A001105(n).