Sharedsupport / 2015-01-23-nemis-lah-numbers.sagewsOpen in CoCalc
Authors: Harald Schilly, ℏal Snyder, William A. Stein
License: GNU General Public License v3.0
Description: Examples for support purposes.
def lah_gen(): # generator (triangel rows) yield [1] L, n = [0], 0 while True: L.append(1) for k in range(n, 0, -1): L[k] = L[k]*(n+k)+L[k-1] yield L n += 1 def lah_triangle(len): # triangle as a list of rows A = lah_gen() return [list(A.next()) for _ in range(len)] lah_triangle(7)
[[1], [0, 1], [0, 2, 1], [0, 6, 6, 1], [0, 24, 36, 12, 1], [0, 120, 240, 120, 20, 1], [0, 720, 1800, 1200, 300, 30, 1]]
show(graphs.DyckGraph())
d3-based renderer not yet implemented