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 A143897 #46 Aug 05 2021 12:26:20 %S A143897 1,1,2,1,4,6,4,1,16,32,44,60,70,56,28,8,1,128,448,864,1552,2720,4288, %T A143897 6312,9004,11992,14372,15400,14630,11968,8104,4376,1820,560,120,16,1, %U A143897 4096,22528,67584,159744,334080,644992,1195008,2158912,3811904,6617184 %N A143897 Triangle read by rows: T(n,k) = number of AVL trees of height n with k (leaf-) nodes, n>=0, fibonacci(n+2)<=k<=2^n. %D A143897 F. Bergeron, G. Labelle and P. Leroux, Combinatorial Species and Tree-Like Structures, Camb. 1998, p. 239, Eq 79, A_5. %D A143897 D. E. Knuth, Art of Computer Programming, Vol. 3, Sect. 6.2.3 (7) and (8). %H A143897 Alois P. Heinz, <a href="/A143897/b143897.txt">Rows n = 0..10, flattened</a> %H A143897 Ralf Hinze, <a href="https://www.cs.ox.ac.uk/ralf.hinze/publications/Brother12.pdf">Functional Pearls: Purely functional 1-2 brother trees</a>, Journal of Functional Programming, 19(6):633-644, 2009, DOI: <a href="http://dx.doi.org/10.1017/S0956796809007333">10.1017/S0956796809007333</a>. %H A143897 R. C. Richards, <a href="http://dx.doi.org/10.1016/0020-0190(83)90085-6">Shape distribution of height-balanced trees</a>, Info. Proc. Lett., 17 (1983), 17-20. %H A143897 Wikipedia, <a href="https://en.wikipedia.org/wiki/AVL_tree">AVL tree</a> %H A143897 <a href="/index/Ro#rooted">Index entries for sequences related to rooted trees</a> %F A143897 See program. %e A143897 There are 2 AVL trees of height 2 with 3 (leaf-) nodes: %e A143897 o o %e A143897 / \ / \ %e A143897 o N N o %e A143897 / \ / \ %e A143897 N N N N %e A143897 Triangle begins: %e A143897 1 %e A143897 . 1 %e A143897 . . 2 1 %e A143897 . . . . 4 6 4 1 %e A143897 . . . . . . . 16 32 44 60 70 56 28 8 1 %e A143897 . . . . . . . . . . . . 128 448 864 1552 2720 ... %p A143897 T:= proc(n,k) local B, z; B:= proc(x,y,d) if d>=1 then x+B(x^2+2*x*y, x, d-1) else x fi end; if n=0 then if k=1 then 1 else 0 fi else coeff(B(z,0,n), z,k) -coeff(B(z,0,n-1), z,k) fi end: fib:= m-> (Matrix([[1,1], [1,0]])^m)[1,2]: seq(seq(T(n,k), k=fib(n+2)..2^n), n=0..6); %t A143897 t[n_, k_] := Module[{ b, z }, b[x_, y_, d_] := If[d >= 1, x + b[x^2 + 2*x*y, x, d-1], x]; If[n == 0, If[k == 1, 1, 0], Coefficient[b[z, 0, n], z, k] - Coefficient [b[z, 0, n-1], z, k]]]; fib[m_] := MatrixPower[{{1, 1}, {1, 0}}, m][[1, 2]]; Table[Table[t[n, k], {k, fib[n+2], 2^n}], {n, 0, 6}] // Flatten (* _Jean-François Alcover_, Dec 05 2013, translated from _Alois P. Heinz_'s Maple program *) %Y A143897 Row sums give: A029758. %Y A143897 Column sums give: A006265. %Y A143897 Column sums of first 5 or 6 rows give: A036662 or A134306. %Y A143897 First elements of rows give: A174677. %Y A143897 First, last elements of columns give: A217299, A217300. %Y A143897 Row lengths give: 1+A008466(n). %Y A143897 Column heights give: A217710(k). %Y A143897 Triangle read by columns gives: A217298. %Y A143897 Cf. A000045, A000079. %K A143897 nonn,look,tabf %O A143897 0,3 %A A143897 _Alois P. Heinz_, Sep 04 2008