A002988
Number of trimmed trees with n nodes.
Original entry on oeis.org
1, 1, 1, 0, 1, 1, 2, 3, 6, 10, 21, 39, 82, 167, 360, 766, 1692, 3726, 8370, 18866, 43029, 98581, 227678, 528196, 1232541, 2888142, 6798293, 16061348, 38086682, 90607902, 216230205, 517482053, 1241778985, 2987268628, 7203242490
Offset: 0
- K. L. McAvaney, personal communication.
- A. J. Schwenk, Almost all trees are cospectral, pp. 275-307 of F. Harary, editor, New Directions in the Theory of Graphs. Academic Press, NY, 1973.
- N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
-
with(numtheory):
g:= proc(n) g(n):= `if`(n=0, 1, add(add(d*(g(d-1)-
`if`(d=2, 1, 0)), d=divisors(j))*g(n-j), j=1..n)/n)
end:
a:= n-> `if`(n=0, 1, g(n-1)+(`if`(irem(n, 2, 'r')=0,
g(r-1), 0)-add(g(i-1)*g(n-i-1), i=1..n-1))/2):
seq(a(n), n=0..40); # Alois P. Heinz, Jul 06 2014
-
g[n_] := g[n] = If[n == 0, 1, Sum[Sum[d*(g[d-1]-If[d == 2, 1, 0]), {d, Divisors[j] }]*g[n-j], {j, 1, n}]/n]; a[n_] := If[n == 0, 1, g[n-1] + (If[Mod[n, 2] == 0, g[Quotient[n, 2]-1], 0] - Sum[g[i-1]*g[n-i-1], {i, 1, n-1}])/2]; Table[a[n], {n, 0, 40}] (* Jean-François Alcover, Feb 25 2015, after Alois P. Heinz *)
A002955
Number of (unordered, unlabeled) rooted trimmed trees with n nodes.
Original entry on oeis.org
1, 1, 1, 2, 4, 8, 17, 36, 79, 175, 395, 899, 2074, 4818, 11291, 26626, 63184, 150691, 361141, 869057, 2099386, 5088769, 12373721, 30173307, 73771453, 180800699, 444101658, 1093104961, 2695730992, 6659914175, 16481146479, 40849449618
Offset: 1
- K. L. McAvaney, personal communication.
- A. J. Schwenk, Almost all trees are cospectral, pp. 275-307 of F. Harary, editor, New Directions in the Theory of Graphs. Academic Press, NY, 1973.
- N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
- Alois P. Heinz, Table of n, a(n) for n = 1..1000 (terms n = 1..300 from Vincenzo Librandi)
- F. Goebel and R. P. Nederpelt, The number of numerical outcomes of iterated powers, Amer. Math. Monthly, 80 (1971), 1097-1103.
- R. K. Guy and J. L. Selfridge, The nesting and roosting habits of the laddered parenthesis, Amer. Math. Monthly 80 (8) (1973), 868-876.
- R. K. Guy and J. L. Selfridge, The nesting and roosting habits of the laddered parenthesis (annotated cached copy)
- N. J. A. Sloane, Transforms
- Index entries for sequences related to rooted trees
-
with(numtheory): a:= proc(n) option remember; local d,j,aa; aa:= n-> a(n)-`if`(n=2,1,0); if n<=1 then n else (add(d*aa(d), d=divisors(n-1)) +add(add(d*aa(d), d=divisors(j)) *a(n-j), j=1..n-2))/ (n-1) fi end: seq(a(n), n=1..32); # Alois P. Heinz, Sep 06 2008
-
a[n_] := a[n] = (Total[ #*b[#]& /@ Divisors[n-1] ] + Sum[ Total[ #*b[#]& /@ Divisors[j] ]*a[n-j], {j, 1, n-2}]) / (n-1); a[1] = 1; b[n_] := a[n]; b[2] = 0; Table[ a[n], {n, 1, 32}](* Jean-François Alcover, Nov 18 2011, after Maple *)
A052329
Number of rooted trees with a forbidden limb of length 6.
Original entry on oeis.org
1, 1, 2, 4, 9, 20, 47, 113, 281, 706, 1807, 4671, 12224, 32247, 85782, 229683, 618767, 1675618, 4559263, 12457483, 34168574, 94040433, 259637564, 718892281, 1995739380, 5553867981, 15490305017, 43293762352, 121235084565
Offset: 1
-
with(numtheory):
g:= proc(n) g(n):= `if`(n=0, 1, add(add(d*(g(d-1)-
`if`(d=6, 1, 0)), d=divisors(j))*g(n-j), j=1..n)/n)
end:
a:= n-> g(n-1):
seq(a(n), n=1..35); # Alois P. Heinz, Jul 04 2014
-
g[n_] := g[n] = If[n == 0, 1, Sum[Sum[d*(g[d-1]-If[d == 6, 1, 0]), {d, Divisors[j]} ]*g[n-j], {j, 1, n}]/n]; a[n_] := g[n-1]; Table[a[n], {n, 1, 35}] (* Jean-François Alcover, Feb 24 2015, after Alois P. Heinz *)
A002992
Number of n-node trees with a forbidden limb of length 6.
Original entry on oeis.org
1, 1, 1, 1, 2, 3, 6, 10, 22, 45, 102, 226, 531, 1253, 3044, 7456, 18604, 46798, 119133, 305567, 790375, 2057523, 5390759, 14200122, 37598572, 100005401, 267131927, 716318650, 1927758155, 5205240762, 14098580633, 38296720823, 104308468102, 284822276099
Offset: 0
- A. J. Schwenk, Almost all trees are cospectral, pp. 275-307 of F. Harary, editor, New Directions in the Theory of Graphs. Academic Press, NY, 1973.
- N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
-
with(numtheory):
g:= proc(n) g(n):= `if`(n=0, 1, add(add(d*(g(d-1)-
`if`(d=6, 1, 0)), d=divisors(j))*g(n-j), j=1..n)/n)
end:
a:= n-> `if`(n=0, 1, g(n-1)+(`if`(irem(n, 2, 'r')=0,
g(r-1), 0)-add(g(i-1)*g(n-i-1), i=1..n-1))/2):
seq(a(n), n=0..40); # Alois P. Heinz, Jul 06 2014
-
g[n_] := g[n] = If[n == 0, 1, Sum[Sum[d*(g[d-1]-If[d == 6, 1, 0]), {d, Divisors[j] }]*g[n-j], {j, 1, n}]/n]; a[n_] := If[n == 0, 1, g[n-1] + (If[Mod[n, 2 ] == 0, g[Quotient[n, 2]-1], 0] - Sum[g[i-1]*g[n-i-1], {i, 1, n-1}])/2]; Table[a[n], {n, 0, 40}] (* Jean-François Alcover, Feb 26 2015, after Alois P. Heinz *)
A052319
Number of increasing rooted trimmed trees with n nodes.
Original entry on oeis.org
1, 1, 1, 2, 7, 28, 131, 720, 4513, 31824, 249513, 2151744, 20242983, 206313024, 2264425179, 26628836352, 334022337153, 4451717814528, 62820790592913, 935750983412736, 14672143677452679, 241555066200437760
Offset: 1
- Vaclav Kotesovec, Table of n, a(n) for n = 1..465
- M. E. Jones and J. B. Remmel, Pattern matching in the cycle structures of permutations, Pure Math. Appl. (PU.M.A.), 22 (2011) 173-208.
- S. Kitaev, Generalized pattern avoidance with additional restrictions, Sem. Lothar. Combinat. B48e (2003).
- S. Kitaev and T. Mansour, Simultaneous avoidance of generalized patterns, arXiv:math/0205182 [math.CO], 2002.
- Rupert Li, Vincular Pattern Avoidance on Cyclic Permutations, arXiv:2107.12353 [math.CO], 2021, p. 7.
- Index entries for sequences related to rooted trees
-
seq(n! * coeff(series(-log(1-sqrt(Pi/2)*erf(x/sqrt(2))), x, n+1), x, n), n=1..20) # Vaclav Kotesovec, Jan 07 2014
-
Rest[CoefficientList[Series[-Log[1-Sqrt[Pi/2]*Erf[x/Sqrt[2]]], {x, 0, 20}], x] * Range[0, 20]!] (* Vaclav Kotesovec, Jan 07 2014 *)
A254382
Number of rooted labeled trees on n nodes such that every nonroot node is the child of a branching node or of the root.
Original entry on oeis.org
0, 1, 2, 3, 16, 85, 696, 6349, 72080, 918873, 13484080, 219335281, 3962458248, 78203547877, 1680235050872, 38958029188485, 970681471597216, 25847378934429361, 732794687650764000, 22032916968153975769, 700360446794528578520
Offset: 0
a(5) = 85:
...0................0...............0-o...
...|.............../ \............ /|\....
...o..............o o...........o o o...
../|\............/ \ ...................
.o o o..........o o ..................
These trees have 20 + 60 + 5 = 85 labelings.
From _Gus Wiseman_, Jan 22 2020: (Start)
The a(1) = 1 through a(4) = 16 trees (in the format root[branches]) are:
1 1[2] 1[2,3] 1[2,3,4]
2[1] 2[1,3] 1[2[3,4]]
3[1,2] 1[3[2,4]]
1[4[2,3]]
2[1,3,4]
2[1[3,4]]
2[3[1,4]]
2[4[1,3]]
3[1,2,4]
3[1[2,4]]
3[2[1,4]]
3[4[1,2]]
4[1,2,3]
4[1[2,3]]
4[2[1,3]]
4[3[1,2]]
(End)
Lone-child-avoiding rooted trees are
A001678(n + 1).
Labeled topologically series-reduced rooted trees are
A060313.
Labeled lone-child-avoiding unrooted trees are
A108919.
-
nn = 20; b = 1 + Sum[nn = n; n! Coefficient[Series[(Exp[x] - x)^n, {x, 0, nn}], x^n]*x^n/n!, {n,1, nn}]; c = Sum[a[n] x^n/n!, {n, 0, nn}]; sol = SolveAlways[b == Series[1/(1 - (c - x)), {x, 0, nn}], x]; Flatten[Table[a[n], {n, 0, nn}] /. sol]
nn = 30; CoefficientList[Series[1+x-1/Sum[SeriesCoefficient[(E^x-x)^n,{x,0,n}]*x^n,{n,0,nn}],{x,0,nn}],x] * Range[0,nn]! (* Vaclav Kotesovec, Jan 30 2015 *)
sps[{}]:={{}};sps[set:{i_,_}]:=Join@@Function[s,Prepend[#,s]&/@sps[Complement[set,s]]]/@Cases[Subsets[set],{i,_}];
lrt[set_]:=If[Length[set]==0,{},Join@@Table[Apply[root,#]&/@Join@@Table[Tuples[lrt/@stn],{stn,sps[DeleteCases[set,root]]}],{root,set}]];
Table[Length[Select[lrt[Range[n]],FreeQ[Z@@#,Integer[]]&]],{n,6}] (* Gus Wiseman, Jan 22 2020 *)
A052321
Number of rooted trees with a forbidden limb of length 3.
Original entry on oeis.org
1, 1, 2, 3, 7, 15, 35, 81, 195, 473, 1171, 2924, 7396, 18848, 48446, 125311, 326145, 853188, 2242616, 5919197, 15683008, 41694334, 111195166, 297393668, 797475499, 2143631474, 5775002574, 15590201095, 42168292074, 114260967888, 310124721255, 843053354234
Offset: 1
-
with(numtheory):
g:= proc(n) g(n):= `if`(n=0, 1, add(add(d*(g(d-1)-
`if`(d=3, 1, 0)), d=divisors(j))*g(n-j), j=1..n)/n)
end:
a:= n-> g(n-1):
seq(a(n), n=1..35); # Alois P. Heinz, Jun 26 2014
-
g[n_] := g[n] = If[n==0, 1, Sum[DivisorSum[j, #*(g[#-1] - If[#==3, 1, 0])&] * g[n-j], {j, 1, n}]/n];
a[n_] := g[n-1];
Table[a[n], {n, 1, 35}] (* Jean-François Alcover, Apr 04 2017, after Alois P. Heinz *)
A052328
Number of rooted trees with a forbidden limb of length 5.
Original entry on oeis.org
1, 1, 2, 4, 9, 19, 46, 110, 273, 684, 1747, 4505, 11763, 30956, 82153, 219437, 589747, 1593170, 4324445, 11787195, 32251520, 88548011, 243877256, 673605521, 1865445693, 5178574184, 14408195935, 40170674295, 112213616851
Offset: 1
-
with(numtheory):
g:= proc(n) g(n):= `if`(n=0, 1, add(add(d*(g(d-1)-
`if`(d=5, 1, 0)), d=divisors(j))*g(n-j), j=1..n)/n)
end:
a:= n-> g(n-1):
seq(a(n), n=1..35); # Alois P. Heinz, Jul 04 2014
-
g[n_] := g[n] = If[n==0, 1, Sum[Sum[d(g[d-1] - If[d==5, 1, 0]), {d, Divisors[j]}] g[n-j], {j, 1, n}]/n];
a[n_] := g[n-1];
Array[a, 35] (* Jean-François Alcover, Dec 18 2020, after Alois P. Heinz *)
A360432
E.g.f. satisfies A(x) = x * exp(A(x) + x^2).
Original entry on oeis.org
0, 1, 2, 15, 112, 1225, 16896, 283759, 5623808, 128431377, 3321026560, 95915951791, 3060250165248, 106896447626137, 4057412577591296, 166284754020913935, 7318183421113532416, 344228133020323687201, 17233838271273426223104, 915000759922243030582735
Offset: 0
A002989
Number of n-node trees with a forbidden limb of length 3.
Original entry on oeis.org
1, 1, 1, 1, 1, 2, 4, 7, 14, 28, 61, 131, 297, 678, 1592, 3770, 9096, 22121, 54451, 135021, 337651, 849698, 2152048, 5479408, 14022947, 36048514, 93061268, 241160180, 627179689, 1636448181, 4282964600, 11241488853, 29584389474
Offset: 0
- A. J. Schwenk, Almost all trees are cospectral, pp. 275-307 of F. Harary, editor, New Directions in the Theory of Graphs. Academic Press, NY, 1973.
- N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
-
with(numtheory):
g:= proc(n) g(n):= `if`(n=0, 1, add(add(d*(g(d-1)-
`if`(d=3, 1, 0)), d=divisors(j))*g(n-j), j=1..n)/n)
end:
a:= n-> `if`(n=0, 1, g(n-1)+(`if`(irem(n, 2, 'r')=0,
g(r-1), 0)-add(g(i-1)*g(n-i-1), i=1..n-1))/2):
seq(a(n), n=0..40); # Alois P. Heinz, Jul 06 2014
-
g[n_] := g[n] = If[n == 0, 1, Sum[Sum[d*(g[d-1]-If[d == 3, 1, 0]), {d, Divisors[j] }]*g[n-j], {j, 1, n}]/n]; a[n_] := If[n == 0, 1, g[n-1] + (If[Mod[n, 2 ] == 0, g[Quotient[n, 2] - 1], 0] - Sum[g[i-1]*g[n-i-1], {i, 1, n-1}])/2]; Table[a[n], {n, 0, 40}] (* Jean-François Alcover, Feb 26 2015, after Alois P. Heinz *)
Showing 1-10 of 18 results.
Comments