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.
%I A308999 #17 Feb 27 2020 11:46:33 %S A308999 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, %T A308999 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, %U A308999 14,0,1,2,3,4,10,15,0,1,2,3,8,12,16 %N A308999 Irregular triangle T(n,k) read by rows: Lexicographically smallest marks on "perfect rulers" (as defined in A103294) of length n. %C A308999 Refer to A103294 for additional definitions, references and links. %C A308999 All rulers (rows) start with mark 0 and end with mark n. %C A308999 Row lengths are A103298(n) + 1. %H A308999 Peter Luschny, <a href="http://www.luschny.de/math/rulers/rulerpyramid.html">The perfect ruler pyramid</a> %H A308999 Peter Luschny, <a href="http://oeis.org/wiki/User:Peter_Luschny/PerfectRulers">Perfect rulers</a> %e A308999 Triangle starts: %e A308999 0; %e A308999 0, 1; %e A308999 0, 1, 2; %e A308999 0, 1, 3; %e A308999 0, 1, 2, 4; %e A308999 0, 1, 2, 5; %e A308999 0, 1, 4, 6; %e A308999 0, 1, 2, 3, 7; %e A308999 0, 1, 2, 5, 8; %e A308999 0, 1, 2, 6, 9; %e A308999 0, 1, 2, 3, 6, 10; %e A308999 0, 1, 2, 3, 7, 11; %e A308999 0, 1, 2, 3, 8, 12; %e A308999 0, 1, 2, 6, 10, 13; %e A308999 0, 1, 2, 3, 4, 9, 14; %e A308999 0, 1, 2, 3, 4, 10, 15; %e A308999 0, 1, 2, 3, 8, 12, 16; %o A308999 (Sage) %o A308999 def Partsum(T) : %o A308999 return [add([T[j] for j in range(i)]) for i in (0..len(T))] %o A308999 def Ruler(L, S) : %o A308999 return map(Partsum, Compositions(L, length=S)) %o A308999 def isComplete(R) : %o A308999 S = Set([]) %o A308999 L = len(R)-1 %o A308999 for i in range(L,0,-1) : %o A308999 for j in (1..i) : %o A308999 S = S.union(Set([R[i]-R[i-j]])) %o A308999 return len(S) == R[L] %o A308999 def CompleteRuler(L, S) : %o A308999 return list(filter(isComplete, Ruler(L, S))) %o A308999 def PerfectRulers(L) : %o A308999 for i in (0..L) : %o A308999 R = CompleteRuler(L, i) %o A308999 if R: return R %o A308999 return [] %o A308999 def A308999list(L): %o A308999 for n in (0..L): %o A308999 print(PerfectRulers(n)[-1]) %o A308999 A308999list(16) # _Peter Luschny_, Aug 21 2019 %Y A308999 Cf. A103294, A103298. %K A308999 nonn,tabf %O A308999 0,6 %A A308999 _Bob Selcoe_, Jul 04 2019