cp's OEIS Frontend

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.

A131893 a(n) is the number of shapes of balanced trees with constant branching factor 7 and n nodes. The node is balanced if the size, measured in nodes, of each pair of its children differ by at most one node.

This page as a plain text file.
%I A131893 #20 Aug 01 2019 20:27:44
%S A131893 1,1,7,21,35,35,21,7,1,49,1029,12005,84035,352947,823543,823543,
%T A131893 17294403,155649627,778248135,2334744405,4202539929,4202539929,
%U A131893 1801088541,21012699645,105063498225,291843050625,486405084375,486405084375,270225046875,64339296875
%N A131893 a(n) is the number of shapes of balanced trees with constant branching factor 7 and n nodes. The node is balanced if the size, measured in nodes, of each pair of its children differ by at most one node.
%H A131893 Alois P. Heinz, <a href="/A131893/b131893.txt">Table of n, a(n) for n = 0..400</a>
%H A131893 Jeffrey Barnett, <a href="http://notatt.com/btree-shapes.pdf">Counting Balanced Tree Shapes</a>
%F A131893 a(0) = a(1) = 1; a(7n+1+m) = (7 choose m) * a(n+1)^m * a(n)^(7-m), where n >= 0 and 0 <= m <= 7.
%p A131893 a:= proc(n) option remember; local m, r; if n<2 then 1 else
%p A131893       r:= iquo(n-1, 7, 'm'); binomial(7, m) *a(r+1)^m *a(r)^(7-m) fi
%p A131893     end:
%p A131893 seq(a(n), n=0..50);  # _Alois P. Heinz_, Apr 10 2013
%t A131893 a[n_, k_] := a[n, k] = Module[{m, r}, If[n < 2 || k == 1, 1, If[k == 0, 0, {r, m} = QuotientRemainder[n - 1, k]; Binomial[k, m]*a[r + 1, k]^m*a[r, k]^(k - m)]]];
%t A131893 a[n_] := a[n, 7];
%t A131893 Table[a[n], {n, 0, 50}] (* _Jean-François Alcover_, Jun 04 2018, after _Alois P. Heinz_ *)
%Y A131893 Cf. A110316, A131889, A131890, A131891, A131892.
%Y A131893 Column k=7 of A221857. - _Alois P. Heinz_, Apr 17 2013
%K A131893 easy,nonn
%O A131893 0,3
%A A131893 _Jeffrey Barnett_, Jul 24 2007