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.

A297791 Number of series-reduced leaf-balanced rooted trees with n nodes. Number of orderless same-trees with n nodes and all leaves equal to 1.

Original entry on oeis.org

1, 0, 1, 1, 1, 1, 2, 1, 2, 2, 2, 1, 5, 1, 3, 3, 4, 3, 5, 3, 6, 4, 6, 3, 12, 3, 10, 7, 9, 6, 12, 9, 13, 16, 14, 22, 22, 24, 21, 24, 28, 14, 32, 15, 42, 20, 60, 27, 84, 44, 100, 59, 113, 74, 116, 85, 110, 97, 96, 113, 106, 149, 147, 234, 235, 377, 380, 580, 576, 838
Offset: 1

Views

Author

Gus Wiseman, Jan 06 2018

Keywords

Comments

An unlabeled rooted tree is leaf-balanced if all branches from the same root have the same number of leaves. It is series-reduced if all positive out-degrees are greater than one.

Examples

			The a(13) = 5 trees: (((oo)(oo))(oooo)), ((ooooo)(ooooo)), ((ooo)(ooo)(ooo)), ((oo)(oo)(oo)(oo)), (oooooooooooo).
		

Crossrefs

Programs

  • Mathematica
    alltim[n_]:=alltim[n]=If[n===1,{{}},Join@@Function[c,Select[Union[Sort/@Tuples[alltim/@c]],And[SameQ@@(Count[#,{},{0,Infinity}]&/@#),FreeQ[#,{_}]]&]]/@IntegerPartitions[n-1]];
    Table[Length[alltim[n]],{n,20}]
  • PARI
    lista(nn) = my(k, r, t, u, w=vector(nn, i, vector(i))); w[1][1]=1; for(s=2, nn, fordiv(s, d, if(dw[i][d], [d..nn]); forvec(v=vector(s/d, i, [1, #u]), if(nn>=r=1+sum(i=1, #v, u[v[i]]), k=1; t=1; for(i=2, #v, if(v[i]==v[i-1], k++, t*=binomial(w[u[v[i-1]]][d]+k-1, k); k=1)); w[r][s]+=t*binomial(w[u[v[#v]]][d]+k-1, k)), 1)))); vector(nn, i, vecsum(w[i])); \\ Jinyuan Wang, Feb 25 2025

Extensions

a(51) onward from Robert G. Wilson v, Jan 07 2018