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 A347608 #37 May 02 2023 16:04:42 %S A347608 1,2,20,1744,2002568,42263042752,21686691099024768, %T A347608 344069541824691045987328,226788686879114461294165127878656 %N A347608 Number of interlacing triangles of size n. %C A347608 An interlacing triangle of size n is a triangular array of the numbers 1, 2, ..., (n+1)*n/2 such that if T(i,j) denotes the j-th number in the i-th row then either T(i-1,j+1) < T(i,j) < T(i-1,j) or T(i-1,j) < T(i,j) < T(i-1,j+1) for 1 < i <= n and 1 <= j <= n-i+1. %C A347608 Generalizes A003121 for the case when rows are not strictly increasing. See comment from Mar 25 2012 and comment from Dec 02 2014. %H A347608 James B. Sidoli, <a href="/A347608/a347608_2.pdf">On the number of interlacing triangles of size n</a> %e A347608 For n = 2, a(2) = 2. The interlacing triangles are given below: %e A347608 2 2 %e A347608 1 3 and 3 1. %o A347608 (Sage) %o A347608 def interlacing(n): %o A347608 C_2=[] %o A347608 part=[j for j in range(n-1,-1,-1)] %o A347608 box=[] %o A347608 big_box=[] %o A347608 pos=0 %o A347608 d=0 %o A347608 C_2_star=[] %o A347608 for g in Words([0,1],n*(n-1)/2).list(): %o A347608 C_2.append(list(g)) %o A347608 for h in C_2: %o A347608 relations=[] %o A347608 pos=0 %o A347608 big_box=[] %o A347608 for j in range(len(part)-1): %o A347608 for k in list(h)[pos:pos+part[j]]: %o A347608 box.append(k) %o A347608 big_box.append(box) %o A347608 box=[] %o A347608 pos=pos+part[j] %o A347608 x=0 %o A347608 for k in range(1,len(big_box)): %o A347608 for r in range(len(big_box[k])): %o A347608 if big_box[k][r]==1 and big_box[k-1][r]==0 and big_box[k-1][r+1]==0 or big_box[k][r]==0 and big_box[k-1][r]==1 and big_box[k-1][r+1]==1: %o A347608 continue %o A347608 else: %o A347608 x=x+1 %o A347608 if x==(n-1)*(n-2)/2: %o A347608 q=q+1 %o A347608 C_2_star.append(big_box) %o A347608 position=range(n*(n+1)/2) %o A347608 for tri in C_2_star: %o A347608 P=[] %o A347608 relations=[] %o A347608 counter=0 %o A347608 collect=[] %o A347608 for j in range(len(tri)): %o A347608 for r in range(len(tri[j])): %o A347608 if tri[j][r]==0: %o A347608 relations.append([position[counter],position[counter+n-j]]) %o A347608 relations.append([position[counter+n-j],position[counter+1]]) %o A347608 if tri[j][r]==1: %o A347608 relations.append([position[counter+n-j],position[counter]]) %o A347608 relations.append([position[counter+1],position[counter+n-j]]) %o A347608 counter=counter+1 %o A347608 counter=counter+1 %o A347608 P=Poset([range(n*(n+1)/2),relations]) %o A347608 d=d+P.linear_extensions().cardinality() %o A347608 return d %Y A347608 Cf. A003121. %K A347608 nonn,more %O A347608 1,2 %A A347608 _James B. Sidoli_, Sep 08 2021 %E A347608 a(7)-a(9) from _Dylan Nelson_, May 09 2022