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.

Showing 1-6 of 6 results.

A298118 Number of unlabeled rooted trees with n nodes in which all positive outdegrees are odd.

Original entry on oeis.org

1, 1, 1, 2, 3, 6, 11, 21, 40, 80, 159, 322, 657, 1356, 2816, 5896, 12407, 26267, 55861, 119331, 255878, 550665, 1188786, 2574006, 5588177, 12162141, 26529873, 57993624, 127020653, 278716336, 612617523, 1348680531, 2973564157, 6565313455, 14514675376
Offset: 1

Views

Author

Gus Wiseman, Jan 12 2018

Keywords

Examples

			The a(6) = 6 trees: (((((o))))), (((ooo))), ((oo(o))), (oo((o))), (o(o)(o)), (ooooo).
		

Crossrefs

Programs

  • Mathematica
    orut[n_]:=orut[n]=If[n===1,{{}},Join@@Function[c,Union[Sort/@Tuples[orut/@c]]]/@Select[IntegerPartitions[n-1],OddQ[Length[#]]&]];
    Table[Length[orut[n]],{n,15}]

Formula

a(n) ~ c * d^n / n^(3/2), where d = 2.30984417428419893876754252289588812511559... and c = 0.5598122522173731208680575003383895445787... - Vaclav Kotesovec, Jun 04 2019

Extensions

a(24)-a(35) from Alois P. Heinz, Jan 12 2018

A301422 Regular triangle where T(n,k) is the number of r-trees of size n with k leaves.

Original entry on oeis.org

1, 1, 0, 1, 1, 0, 1, 2, 1, 0, 1, 4, 3, 1, 0, 1, 6, 8, 4, 1, 0, 1, 9, 19, 14, 5, 1, 0, 1, 12, 36, 40, 21, 6, 1, 0, 1, 16, 65, 102, 75, 30, 7, 1, 0, 1, 20, 106, 223, 224, 123, 40, 8, 1, 0, 1, 25, 168, 457, 604, 439, 191, 52, 9, 1, 0, 1, 30, 248, 847, 1433, 1346, 764, 276
Offset: 1

Views

Author

Gus Wiseman, Mar 20 2018

Keywords

Comments

An r-tree (A093637) of size n > 0 is a finite sequence of r-trees with weakly decreasing sizes summing to n - 1. This is a similar construction to p-trees (A196545) except that r-trees are not required to be series-reduced and are weighted by all nodes (including the root) rather than just the leaves.

Examples

			Triangle begins:
  1
  1   0
  1   1   0
  1   2   1   0
  1   4   3   1   0
  1   6   8   4   1   0
  1   9  19  14   5   1   0
  1  12  36  40  21   6   1   0
  1  16  65 102  75  30   7   1   0
  1  20 106 223 224 123  40   8   1   0
  1  25 168 457 604 439 191  52   9   1   0
  ...
The T(6,3) = 8 r-trees: (((ooo))), (((oo)o)), (((o)oo)), (((oo))o), (((o)o)o), ((oo)(o)), (((o))oo), ((o)(o)o).
		

Crossrefs

Programs

  • Mathematica
    rtrees[n_]:=Join@@Table[Tuples[rtrees/@y],{y,IntegerPartitions[n-1]}];
    Table[Length[Select[rtrees[n],Count[#,{},{-2}]===k&]],{n,8},{k,n}]
  • PARI
    A(n)={my(v=vector(n)); v[1]=y; for(n=2, n, v[n] = polcoef(1/prod(k=1, n-1, 1 - v[k]*x^k + O(x^n)), n-1)); vector(n, k, Vecrev(v[k]/y,k))}
    { my(T=A(10)); for(n=1, #T, print(T[n])) } \\ Andrew Howroyd, Aug 26 2018

A295461 Number of unlabeled rooted trees with 2n + 1 nodes in which all outdegrees are even.

Original entry on oeis.org

1, 1, 2, 5, 12, 33, 91, 264, 780, 2365, 7274, 22727, 71784, 229094, 737215, 2390072, 7798020, 25587218, 84377881, 279499063, 929556155, 3102767833, 10390936382, 34903331506, 117564309276, 396994228503, 1343716120550, 4557952756658, 15491856887741
Offset: 0

Views

Author

Gus Wiseman, Jan 13 2018

Keywords

Examples

			The a(3) = 5 trees: (o(o(oo))), (o(oooo)), ((oo)(oo)), (ooo(oo)), (oooooo).
		

Crossrefs

Programs

  • Mathematica
    erut[n_]:=erut[n]=If[n===1,{{}},Join@@Function[c,Union[Sort/@Tuples[erut/@c]]]/@Select[IntegerPartitions[n-1],EvenQ[Length[#]]&]];
    Table[Length[erut[n]],{n,1,30,2}]

A298533 Number of unlabeled rooted trees with n vertices such that every branch of the root has the same number of leaves.

Original entry on oeis.org

1, 1, 2, 4, 8, 15, 31, 64, 144, 333, 808, 2004, 5109, 13199, 34601, 91539, 244307, 656346, 1774212, 4820356, 13157591, 36060811, 99198470, 273790194, 757971757, 2104222594, 5856496542, 16338140048, 45678276507, 127964625782, 359155302204, 1009790944307
Offset: 1

Views

Author

Gus Wiseman, Jan 20 2018

Keywords

Examples

			The a(5) = 8 trees: ((((o)))), (((oo))), ((o(o))), ((ooo)), (o((o))), ((o)(o)), (oo(o)), (oooo)
		

Crossrefs

Programs

  • Mathematica
    rut[n_]:=rut[n]=If[n===1,{{}},Join@@Function[c,Union[Sort/@Tuples[rut/@c]]]/@IntegerPartitions[n-1]];
    Table[Length[Select[rut[n],SameQ@@(Count[#,{},{0,Infinity}]&/@#)&]],{n,15}]
  • PARI
    \\ here R is A055277 as vector of polynomials
    EulerT(v)={Vec(exp(x*Ser(dirmul(v,vector(#v,n,1/n))))-1, -#v)}
    R(n) = {my(A = O(x)); for(j=1, n, A = x*(y - 1  + exp( sum(i=1, j, 1/i * subst( subst( A + x * O(x^(j\i)), x, x^i), y, y^i) ) ))); Vec(A)};
    seq(n)={my(M=Mat(apply(p->Colrev(p,n), R(n-1)))); concat([1],sum(i=2, #M, EulerT(M[i,])))} \\ Andrew Howroyd, May 20 2018

Extensions

Terms a(19) and beyond from Andrew Howroyd, May 20 2018

A298535 Number of unlabeled rooted trees with n vertices such that every branch of the root has a different number of leaves.

Original entry on oeis.org

1, 1, 1, 2, 5, 13, 32, 80, 200, 511, 1323, 3471, 9183, 24491, 65715, 177363, 481135, 1311340, 3589023, 9860254, 27181835, 75165194, 208439742, 579522977, 1615093755, 4511122964, 12625881944, 35405197065, 99459085125, 279861792874, 788712430532, 2226015529592
Offset: 1

Views

Author

Gus Wiseman, Jan 20 2018

Keywords

Crossrefs

Programs

  • Mathematica
    rut[n_]:=rut[n]=If[n===1,{{}},Join@@Function[c,Union[Sort/@Tuples[rut/@c]]]/@IntegerPartitions[n-1]];
    Table[Length[Select[rut[n],UnsameQ@@(Count[#,{},{0,Infinity}]&/@#)&]],{n,15}]
  • PARI
    \\ here R is A055277 as vector of polynomials
    R(n) = {my(A = O(x)); for(j=1, n, A = x*(y - 1  + exp( sum(i=1, j, 1/i * subst( subst( A + x * O(x^(j\i)), x, x^i), y, y^i) ) ))); Vec(A)};
    seq(n) = {my(M=Mat(apply(p->Colrev(p,n), R(n-1)))); Vec(prod(i=2, #M, 1 + x*Ser(M[i,])))} \\ Andrew Howroyd, May 20 2018

Extensions

Terms a(19) and beyond from Andrew Howroyd, May 20 2018

A298537 Number of unlabeled rooted trees with n nodes such that every branch of the root has the same number of nodes.

Original entry on oeis.org

1, 1, 2, 3, 6, 10, 25, 49, 127, 291, 766, 1843, 5003, 12487, 34151, 87983, 242088, 634848, 1763749, 4688677, 13085621, 35241441, 98752586, 268282856, 755353825, 2067175933, 5837592853, 16087674276, 45550942142, 126186554309, 358344530763, 997171512999
Offset: 1

Views

Author

Gus Wiseman, Jan 20 2018

Keywords

Examples

			The a(5) = 6 trees: ((((o)))), (((oo))), ((o(o))), ((ooo)), ((o)(o)), (oooo).
		

Crossrefs

Programs

  • Mathematica
    r[n_]:=r[n]=If[n===1,1,Sum[Product[Binomial[r[x]+Count[ptn,x]-1,Count[ptn,x]],{x,Union[ptn]}],{ptn,IntegerPartitions[n-1]}]];
    Table[If[n===1,1,Sum[Binomial[r[(n-1)/d]+d-1,d],{d,Divisors[n-1]}]],{n,40}]

Formula

a(n + 1) = Sum_{d|n} binomial(A000081(n/d) + d - 1, d).
Showing 1-6 of 6 results.