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 A380761 #63 Jun 21 2025 19:58:38 %S A380761 1,2,16,192,2720,42224,694848,11907648,210240256,3797869056, %T A380761 69859601920,1304037291008,24639504760832,470342682171392, %U A380761 9057003542405120,175721074857734144,3431733070223491072,67407828276358119424,1330851767254309142528,26395675263287212834816 %N A380761 Number of rooted ordered trees with n internal nodes where each node has out-degree 0, 2, or 6. %C A380761 a(n) is the number of paths that start at (0,0), never go below the x-axis and end on the x-axis with n ascending steps, where ascending steps are (1,1) and (1,5) and descending steps are (1,-1). %H A380761 Ahmat Mahamat, <a href="https://github.com/Ahmat-2000/Generateurs_aleatoire_arbre_hexabinaire">Github repo</a> %F A380761 G.f. satisfies: A(z) = 1 + z*A(z)^2 + z*A(z)^6. %F A380761 a(n) = (1/n) * Sum_{k=0..n} binomial(n, k) * binomial(2*n + 4*k, n + 4*k + 1) for n >= 1. %e A380761 The a(0) = 1 tree with 0 internal nodes is simply a single leaf node. %e A380761 The a(1) = 2 trees are those with 1 internal node and either 2 or 6 leaves. %p A380761 a:= n-> if n = 0 then 1 else add(binomial(n, k) * binomial(2*n + 4*k, n + 4*k + 1), k=0..n)/n end if: %p A380761 seq(a(n), n = 0..19); %t A380761 a[n_] := If[n == 0, 1, Sum[Binomial[n, k] * Binomial[2 n + 4 k, n + 4 k + 1], {k, 0, n}]/n] %o A380761 (Python) %o A380761 import math %o A380761 def a(n): %o A380761 return 1 if n == 0 else sum(math.comb(n, k) * math.comb(2 * n + 4 * k, n + 4 * k + 1) for k in range(n + 1)) // n %o A380761 print([a(n) for n in range(20)]) %Y A380761 Cf. A001764 (number of complete ternary trees with n internal nodes). %K A380761 nonn,easy %O A380761 0,2 %A A380761 _Ahmat Mahamat_, Feb 02 2025