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.

A260617 Three-dimensional array read by shells: S(i, j, k) = i + j + k; i >= 0, j >= 0, k >= 0.

Original entry on oeis.org

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

Views

Author

Matthew Campbell, Sep 17 2015

Keywords

Comments

The triples (i,j,k) are ordered first by maximal coordinate, and then lexicographically. - Charlie Neder, Dec 23 2018

Examples

			S(0, 0, 0) = 0 + 0 + 0 = 0.
S(0, 0, 1) = 0 + 0 + 1 = 1.
S(0, 1, 0) = 0 + 1 + 0 = 1.
S(0, 1, 1) = 0 + 1 + 1 = 2.
S(1, 0, 0) = 1 + 0 + 0 = 1.
S(1, 0, 1) = 1 + 0 + 1 = 2.
S(1, 1, 0) = 1 + 1 + 0 = 2.
S(1, 1, 1) = 1 + 1 + 1 = 3.
S(0, 0, 2) = 0 + 0 + 2 = 2.
...
		

Programs

  • Python
    s = lambda x,y,z : x+y+z # function for 3d array
    i = 1
    for n in range(0,10):
      for x in range(0,n+1):
        for y in range(0,n+1):
          if (x!=n and y!=n):
            print(i, s(x,y,n))
            i += 1
          else:
            for z in range(0,n+1):
              print(i, s(x,y,z))
              i += 1
    # Charlie Neder, Dec 26 2018

Extensions

Definition clarified by Charlie Neder, Dec 25 2018