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.

A127094 Triangle, reversal of A127093.

Original entry on oeis.org

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

Views

Author

Gary W. Adamson, Jan 05 2007

Keywords

Examples

			First few rows of the triangle are:
  1;
  2, 1;
  3, 0, 1;
  4, 0, 2, 1;
  5, 0, 0, 0, 1;
  6, 0, 0, 3, 2, 1;
  ...
		

Crossrefs

Cf. A000203 (row sums), A126988, A127093.

Programs

  • Magma
    [n mod (k-n-1) - (n+1) mod (k-n-1) + 1: k in [1..n], n in [1..12]]; // G. C. Greubel, Mar 08 2021
  • Mathematica
    Table[Mod[n, k-n-1] - Mod[n+1, k-n-1] +1, {n,12}, {k,n}]//Flatten (* G. C. Greubel, Mar 08 2021 *)
  • Sage
    flatten([[n%(k-n-1) - (n+1)%(k-n-1) + 1 for k in [1..n]] for n in [1..12]]) # G. C. Greubel, Mar 08 2021
    

Formula

Reversed rows of A127093.
T(n, K) = mod(n, k-n-1) - mod(n+1, k-n-1) + 1. - Mats Granvik, Sep 02 2007