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.

A294317 Triangle read by rows: T(n, k) = 2*n-k, k <= n.

Original entry on oeis.org

0, 2, 1, 4, 3, 2, 6, 5, 4, 3, 8, 7, 6, 5, 4, 10, 9, 8, 7, 6, 5, 12, 11, 10, 9, 8, 7, 6, 14, 13, 12, 11, 10, 9, 8, 7, 16, 15, 14, 13, 12, 11, 10, 9, 8, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10
Offset: 0

Views

Author

Kolosov Petro, Oct 28 2017

Keywords

Examples

			Triangle begins:
   0;
   2,  1;
   4,  3,  2;
   6,  5,  4,  3;
   8,  7,  6,  5,  4;
  10,  9,  8,  7,  6,  5;
  12, 11, 10,  9,  8,  7,  6;
  14, 13, 12, 11, 10,  9,  8,  7;
  16, 15, 14, 13, 12, 11, 10,  9,  8;
  18, 17, 16, 15, 14, 13, 12, 11, 10, 9;
  20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10;
  ...
		

Crossrefs

Programs

  • GAP
    A294317 := Flat(List([0..149],n->List([0..n],k->2*n-k))); # Muniru A Asiru, Dec 29 2017
  • Mathematica
    Column[Table[2*n-k, {n, 0, 10}, {k, 0, n}], Center]
  • Python
    def f(x):
        a=[]
        for k in range(x):
            for m in range (k+1):
                a.append(2*k-m)
        return a
    print(f(10))
    

Formula

T(n, k) = 2*n - k, 0 <= k <= n.
T(n, 2*m) = A005843(n), n >= m >= 0 (even-indexed columns).
T(n, 2*m+1) = A005408(n), n >= m >= 0 (odd-indexed columns).
T(n, n-m) = A001477(n+m), n >= m >= 0 (diagonals m >= 0).
2*A287326(n, k) = A287326(T(n, k),k) + A287326(T(n, k),0).
G.f.: x*(2 + y - 3*x*y)/((1 - x)^2*(1 - x*y)^2). - Stefano Spezia, Sep 14 2024

Extensions

Edited by Wolfdieter Lang, Dec 08 2017