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.

A308999 Irregular triangle T(n,k) read by rows: Lexicographically smallest marks on "perfect rulers" (as defined in A103294) of length n.

Original entry on oeis.org

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

Views

Author

Bob Selcoe, Jul 04 2019

Keywords

Comments

Refer to A103294 for additional definitions, references and links.
All rulers (rows) start with mark 0 and end with mark n.
Row lengths are A103298(n) + 1.

Examples

			Triangle starts:
  0;
  0,  1;
  0,  1,  2;
  0,  1,  3;
  0,  1,  2,  4;
  0,  1,  2,  5;
  0,  1,  4,  6;
  0,  1,  2,  3,  7;
  0,  1,  2,  5,  8;
  0,  1,  2,  6,  9;
  0,  1,  2,  3,  6, 10;
  0,  1,  2,  3,  7, 11;
  0,  1,  2,  3,  8, 12;
  0,  1,  2,  6, 10, 13;
  0,  1,  2,  3,  4,  9, 14;
  0,  1,  2,  3,  4, 10, 15;
  0,  1,  2,  3,  8, 12, 16;
		

Crossrefs

Programs

  • Sage
    def Partsum(T) :
        return [add([T[j] for j in range(i)]) for i in (0..len(T))]
    def Ruler(L, S) :
        return map(Partsum, Compositions(L, length=S))
    def isComplete(R) :
        S = Set([])
        L = len(R)-1
        for i in range(L,0,-1) :
            for j in (1..i) :
                S = S.union(Set([R[i]-R[i-j]]))
        return len(S) == R[L]
    def CompleteRuler(L, S) :
        return list(filter(isComplete, Ruler(L, S)))
    def PerfectRulers(L) :
        for i in (0..L) :
            R = CompleteRuler(L, i)
            if R: return R
        return []
    def A308999list(L):
        for n in (0..L):
            print(PerfectRulers(n)[-1])
    A308999list(16) # Peter Luschny, Aug 21 2019