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 A379035 #13 Dec 16 2024 10:47:49 %S A379035 1,3,20,201,2574,38740,654334,12050561,237383562,4935186778, %T A379035 107233505624,2417430607946,56224895607144,1343171657532430, %U A379035 32841495349026802,819503313717327041,20820095694805722362,537474654188020125882,14075078600122360679520,373373810133893669112710 %N A379035 Number of intervals in the lattice of Schroeder paths of length 2*n. %C A379035 a(n) is the number of nested pairs of Schroeder paths of length 2*n. %H A379035 Alois P. Heinz, <a href="/A379035/b379035.txt">Table of n, a(n) for n = 0..661</a> %e A379035 The a(2) = 20 pairs of Schroeder paths are: %e A379035 . __ %e A379035 ____ __/\ /\__ /\/\ / \ %e A379035 ____ ____ ____ ____ ____ %e A379035 . %e A379035 /\ __ /\ %e A379035 / \ __/\ /\/\ / \ / \ %e A379035 ____ __/\ __/\ __/\ __/\ %e A379035 . %e A379035 __ /\ %e A379035 /\__ /\/\ / \ / \ /\/\ %e A379035 /\__ /\__ /\__ /\__ /\/\ %e A379035 . %e A379035 __ /\ __ /\ /\ %e A379035 / \ / \ /__\ /__\ //\\ %e A379035 /\/\ /\/\ / \ / \ / \ %o A379035 (Python) %o A379035 from collections import defaultdict %o A379035 def a_gen(n): #generator of terms a(0) to a(n) %o A379035 D = {(0,0):1} %o A379035 for k in range(2*n+2): %o A379035 D2 = defaultdict(int) %o A379035 for i,j in D: %o A379035 d = D[(i,j)] %o A379035 mi,mj = (i-k)%2,(j-k)%2 %o A379035 for a in range(-mi,mi+1): %o A379035 for b in range(-mj,mj+1): %o A379035 if 0 <= i+a <= j+b <= 2*n-k+1: %o A379035 D2[(i+a,j+b)] += d %o A379035 D = D2 %o A379035 if k%2==1: %o A379035 yield D[(0,0)] %Y A379035 Cf. A006318 (number of Schroeder paths), A005700 (number of intervals in the lattice of Dyck paths), A379034 (number of intervals in the lattice of Motzkin paths). %K A379035 nonn %O A379035 0,2 %A A379035 _Ludovic Schwob_, Dec 14 2024