A004111
Number of rooted identity trees with n nodes (rooted trees whose automorphism group is the identity group).
Original entry on oeis.org
0, 1, 1, 1, 2, 3, 6, 12, 25, 52, 113, 247, 548, 1226, 2770, 6299, 14426, 33209, 76851, 178618, 416848, 976296, 2294224, 5407384, 12780394, 30283120, 71924647, 171196956, 408310668, 975662480, 2335443077, 5599508648, 13446130438, 32334837886, 77863375126, 187737500013, 453203435319, 1095295264857, 2649957419351
Offset: 0
The 2 identity trees with 4 nodes are:
O O
/ \ |
O O O
| |
O O
|
O
These correspond to the sets {{},{{}}} and {{{{}}}}.
G.f.: x + x^2 + x^3 + 2*x^4 + 3*x^5 + 6*x^6 + 12*x^7 + 25*x^8 + 52*x^9 + ...
- F. Bergeron, G. Labelle and P. Leroux, Combinatorial Species and Tree-Like Structures, Camb. 1998, p. 330.
- S. R. Finch, Mathematical Constants, Cambridge, 2003, p. 301 and 562.
- F. Harary and E. M. Palmer, Graphical Enumeration, Academic Press, NY, 1973, p. 64, Eq. (3.3.15); p. 80, Problem 3.10.
- D. E. Knuth, Fundamental Algorithms, 3rd Ed., 1997, pp. 386-388.
- 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 = 0..2500 (first 201 terms from T. D. Noe)
- Joerg Arndt, All identity trees for n = 1..11.
- P. J. Cameron, Some sequences of integers, Discrete Math., 75 (1989), 89-102; also in "Graph Theory and Combinatorics 1988", ed. B. Bollobas, Annals of Discrete Math., 43 (1989), 89-102.
- A. Genitrini, Full asymptotic expansion for Polya structures, arXiv:1605.00837 [math.CO], May 03 2016, p. 8.
- Bernhard Gittenberger, Emma Yu Jin, Michael Wallner, On the shape of random Pólya structures, arXiv|1707.02144 [math.CO], 2017-2018; Discrete Math., 341 (2018), 896-911.
- Frank Harary and Geert Prins, The number of homeomorphically irreducible trees and other species, Acta Math., 101 (1959), 141-162.
- F. Harary, R. W. Robinson and A. J. Schwenk, Twenty-step algorithm for determining the asymptotic number of trees of various species, J. Austral. Math. Soc., Series A, 20 (1975), 483-503.
- F. Harary, R. W. Robinson and A. J. Schwenk, Corrigenda: Twenty-step algorithm for determining the asymptotic number of trees of various species, J. Austral. Math. Soc., Series A 41 (1986), p. 325.
- INRIA Algorithms Project, Encyclopedia of Combinatorial Structures 56.
- P. Leroux and B. Miloudi, Généralisations de la formule d'Otter, Ann. Sci. Math. Québec, Vol. 16, No. 1, pp. 53-80, 1992. (Annotated scanned copy)
- T. Motzkin, The hypersurface cross ratio, Bull. Amer. Math. Soc., 51 (1945), 976-984.
- T. S. Motzkin, Relations between hypersurface cross ratios and a combinatorial formula for partitions of a polygon, for permanent preponderance and for non-associative products, Bull. Amer. Math. Soc., 54 (1948), 352-360.
- N. J. A. Sloane, Sketch showing trees with 2 through 6 nodes.
- Index entries for sequences related to rooted trees
-
import Data.List (genericIndex)
a004111 = genericIndex a004111_list
a004111_list = 0 : 1 : f 1 [1] where
f x zs = y : f (x + 1) (y : zs) where
y = (sum $ zipWith (*) zs $ map g [1..]) `div` x
g k = sum $ zipWith (*) (map (((-1) ^) . (+ 1)) $ reverse divs)
(zipWith (*) divs $ map a004111 divs)
where divs = a027750_row k
-- Reinhard Zumkeller, Apr 29 2014
-
A004111 := proc(n)
spec := [ A, {A=Prod(Z,PowerSet(A))} ]:
combstruct[count](spec, size=n) ;
end proc:
# second Maple program:
with(numtheory):
a:= proc(n) a(n):= `if`(n<2, n, add(a(n-k)*add(a(d)*d*
(-1)^(k/d+1), d=divisors(k)), k=1..n-1)/(n-1))
end:
seq(a(n), n=0..50); # Alois P. Heinz, Jul 15 2014
-
s[ n_, k_ ] := s[ n, k ]=a[ n+1-k ]+If[ n<2k, 0, -s[ n-k, k ] ]; a[ 1 ]=1; a[ n_ ] := a[ n ]=Sum[ a[ i ]s[ n-1, i ]i, {i, 1, n-1} ]/(n-1); Table[ a[ i ], {i, 1, 30} ] (* Robert A. Russell *)
a[ n_] := If[ n < 2, Boole[n == 1], Nest[ CoefficientList[ Normal[ Times @@ (Table[1 + x^k, {k, Length@#}]^#) + x O[x]^Length@#], x] &, {}, n - 1][[n]]]; (* Michael Somos, Jul 10 2014 *)
a[n_] := a[n] = Sum[a[n-k]*Sum[a[d]*d*(-1)^(k/d+1),{d, Divisors[k]}], {k, 1, n-1}]/(n-1); a[0]=0; a[1]=1; Table[a[n], {n, 0, 40}] (* Jean-François Alcover, Feb 02 2015 *)
-
N=66; A=vector(N+1, j, 1);
for (n=1, N, A[n+1] = 1/n * sum(k=1, n, sumdiv(k, d, (-1)^(k/d+1) * d * A[d]) * A[n-k+1] ) );
concat([0], A)
\\ Joerg Arndt, Jul 10 2014
A242249
Number A(n,k) of rooted trees with n nodes and k-colored non-root nodes; square array A(n,k), n>=0, k>=0, read by antidiagonals.
Original entry on oeis.org
0, 0, 1, 0, 1, 0, 0, 1, 1, 0, 0, 1, 2, 2, 0, 0, 1, 3, 7, 4, 0, 0, 1, 4, 15, 26, 9, 0, 0, 1, 5, 26, 82, 107, 20, 0, 0, 1, 6, 40, 188, 495, 458, 48, 0, 0, 1, 7, 57, 360, 1499, 3144, 2058, 115, 0, 0, 1, 8, 77, 614, 3570, 12628, 20875, 9498, 286, 0, 0, 1, 9, 100, 966, 7284, 37476, 111064, 142773, 44947, 719, 0
Offset: 0
Square array A(n,k) begins:
0, 0, 0, 0, 0, 0, 0, 0, ...
1, 1, 1, 1, 1, 1, 1, 1, ...
0, 1, 2, 3, 4, 5, 6, 7, ...
0, 2, 7, 15, 26, 40, 57, 77, ...
0, 4, 26, 82, 188, 360, 614, 966, ...
0, 9, 107, 495, 1499, 3570, 7284, 13342, ...
0, 20, 458, 3144, 12628, 37476, 91566, 195384, ...
0, 48, 2058, 20875, 111064, 410490, 1200705, 2984142, ...
Columns k=0-10 give:
A063524,
A000081,
A000151,
A006964,
A052763,
A052788,
A246235,
A246236,
A246237,
A246238,
A246239.
-
with(numtheory):
A:= proc(n, k) option remember; `if`(n<2, n, (add(add(d*
A(d, k), d=divisors(j))*A(n-j, k)*k, j=1..n-1))/(n-1))
end:
seq(seq(A(n, d-n), n=0..d), d=0..12);
-
nn = 10; t[x_] := Sum[a[n] x^n, {n, 1, nn}]; Transpose[ Table[Flatten[ sol = SolveAlways[ 0 == Series[ t[x] - x Product[1/(1 - x^i)^(n a[i]), {i, 1, nn}], {x, 0, nn}], x]; Flatten[{0, Table[a[n], {n, 1, nn}]}] /. sol], {n, 0, nn}]] // Grid (* Geoffrey Critzer, Nov 11 2014 *)
A[n_, k_] := A[n, k] = If[n<2, n, Sum[Sum[d*A[d, k], {d, Divisors[j]}] *A[n-j, k]*k, {j, 1, n-1}]/(n-1)]; Table[Table[A[n, d-n], {n, 0, d}], {d, 0, 12}] // Flatten (* Jean-François Alcover, Dec 04 2014, translated from Maple *)
-
\\ ColGf gives column generating function
ColGf(N,k) = {my(A=vector(N, j, 1)); for (n=1, N-1, A[n+1] = k/n * sum(i=1, n, sumdiv(i, d, d*A[d]) * A[n-i+1] ) ); x*Ser(A)}
Mat(vector(8, k, concat(0, Col(ColGf(7, k-1))))) \\ Andrew Howroyd, May 12 2018
A005753
Number of rooted identity matched trees with n nodes.
Original entry on oeis.org
1, 2, 5, 18, 66, 266, 1111, 4792, 21124, 94888, 432415, 1994828, 9296712, 43706722, 207030398, 987130456, 4733961435, 22819241034, 110500644857, 537295738556, 2622248720234, 12840953621208, 63074566121245, 310693364823376, 1534374047239554, 7595642577152762
Offset: 1
G.f.: A(x) = x + 2*x^2 + 5*x^3 + 18*x^4 + 66*x^5 + 266*x^6 + ...
where A(x) = x*(1+x)^2*(1+x^2)^4*(1+x^3)^10*(1+x^4)^36*(1+x^5)^132*... (the exponents are A038077(n), n>=1).
- 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
- INRIA Algorithms Project, Encyclopedia of Combinatorial Structures 429
- R. Simion, Trees with 1-factors and oriented trees, Discrete Math., 88 (1991), 93-104.
- R. Simion, Trees with 1-factors and oriented trees, Discrete Math., 88 (1981), 97. (Annotated scanned copy)
- Index entries for sequences related to rooted trees
- Index entries for sequences related to trees
-
b:= proc(n, i) option remember; `if`(n=0, 1, `if`(i<1, 0,
add(binomial(2*a(i), j)*b(n-i*j, i-1), j=0..n/i)))
end:
a:= n-> `if`(n=1, 1, b((n-1)$2)):
seq(a(n), n=1..40); # Alois P. Heinz, Aug 01 2013
-
b[n_, i_] := b[n, i] = If[n == 0, 1, If[i<1, 0, Sum[Binomial[2*a[i], j]*b[n-i*j, i-1], {j, 0, n/i}]]]; a[n_] := If[n == 1, 1, b[n-1, n-1]]; Table[a[n] // FullSimplify, {n, 1, 30}] (* Jean-François Alcover, Mar 17 2014, after Alois P. Heinz *)
-
{a(n)=polcoeff(x*prod(k=1, n-1, (1+x^k+x*O(x^n))^(2*a(k))), n)} /* Paul D. Hanna */
A319254
Array read by antidiagonals: T(n,k) is the number of series-reduced rooted trees with n leaves of k colors.
Original entry on oeis.org
1, 2, 1, 3, 3, 2, 4, 6, 10, 5, 5, 10, 28, 40, 12, 6, 15, 60, 156, 170, 33, 7, 21, 110, 430, 948, 785, 90, 8, 28, 182, 965, 3396, 6206, 3770, 261, 9, 36, 280, 1890, 9376, 28818, 42504, 18805, 766, 10, 45, 408, 3360, 21798, 97775, 256172, 301548, 96180, 2312
Offset: 1
Array begins:
==================================================================
n\k| 1 2 3 4 5 6 7
---+--------------------------------------------------------------
1 | 1 2 3 4 5 6 7 ...
2 | 1 3 6 10 15 21 28 ...
3 | 2 10 28 60 110 182 280 ...
4 | 5 40 156 430 965 1890 3360 ...
5 | 12 170 948 3396 9376 21798 44856 ...
6 | 33 785 6206 28818 97775 269675 642124 ...
7 | 90 3770 42504 256172 1068450 3496326 9632960 ...
8 | 261 18805 301548 2357138 12081605 46897359 149491104 ...
9 | 766 96180 2195100 22253672 140160650 645338444 2379859608 ...
...
-
b:= proc(n, i, k) option remember; `if`(n=0, 1, `if`(i<1, 0,
add(binomial(A(i, k)+j-1, j)*b(n-i*j, i-1, k), j=0..n/i)))
end:
A:= (n, k)-> `if`(n<2, n*k, b(n, n-1, k)):
seq(seq(A(n, 1+d-n), n=1..d), d=1..12); # Alois P. Heinz, Sep 17 2018
-
b[n_, i_, k_] := b[n, i, k] = If[n == 0, 1, If[i < 1, 0, Sum[Binomial[A[i, k] + j - 1, j] b[n - i j, i - 1, k], {j, 0, n/i}]]];
A[n_, k_] := If[n < 2, n k, b[n, n - 1, k]];
Table[A[n, 1 + d - n], {d, 1, 12}, {n, 1, d}] // Flatten (* Jean-François Alcover, Sep 11 2019, after Alois P. Heinz *)
-
\\ here R(n,k) gives k'th column as a vector.
EulerT(v)={Vec(exp(x*Ser(dirmul(v, vector(#v, n, 1/n))))-1, -#v)}
R(n,k)={my(v=[k]); for(n=2, n, v=concat(v, EulerT(concat(v,[0]))[n])); v}
{my(T=Mat(vector(8, k, R(8, k)~))); for(n=1, #T~, print(T[n,]))} \\ Andrew Howroyd, Sep 15 2018
A052757
Number of rooted identity trees with n nodes and 3-colored non-root nodes.
Original entry on oeis.org
0, 1, 3, 12, 64, 363, 2214, 14043, 91857, 614676, 4189254, 28974915, 202870938, 1435094800, 10241197917, 73639001172, 533004547453, 3880381334415, 28395656513145, 208748382089131, 1540935621796941, 11417266889312313, 84880193073070819, 632976019285857201
Offset: 0
encyclopedia(AT)pommard.inria.fr, Jan 25 2000
a(3) = 12:
o o o o o o o o o o o o
| | | | | | | | | / \ / \ / \
1 1 1 2 2 2 3 3 3 1 2 1 3 2 3
| | | | | | | | |
1 2 3 1 2 3 1 2 3 - _Alois P. Heinz_, Feb 24 2015
-
spec := [S,{S=Prod(B,B,B,Z),B=PowerSet(S)},unlabeled]: seq(combstruct[count](spec,size=n), n=0..20);
A319376
Triangle read by rows: T(n,k) is the number of lone-child-avoiding rooted trees with n leaves of exactly k colors.
Original entry on oeis.org
1, 1, 1, 2, 6, 4, 5, 30, 51, 26, 12, 146, 474, 576, 236, 33, 719, 3950, 8572, 8060, 2752, 90, 3590, 31464, 108416, 175380, 134136, 39208, 261, 18283, 245916, 1262732, 3124650, 4014348, 2584568, 660032, 766, 94648, 1908858, 14047288, 49885320, 95715728, 101799712, 56555904, 12818912
Offset: 1
Triangle begins:
1;
1, 1;
2, 6, 4;
5, 30, 51, 26;
12, 146, 474, 576, 236;
33, 719, 3950, 8572, 8060, 2752;
90, 3590, 31464, 108416, 175380, 134136, 39208;
261, 18283, 245916, 1262732, 3124650, 4014348, 2584568, 660032;
...
From _Gus Wiseman_, Dec 31 2020: (Start)
The 12 trees counted by row n = 3:
(111) (112) (123)
(1(11)) (122) (1(23))
(1(12)) (2(13))
(1(22)) (3(12))
(2(11))
(2(12))
(End)
The unlabeled version, counting inequivalent leaf-colorings of lone-child-avoiding rooted trees, is
A330465.
Lone-child-avoiding rooted trees are counted by
A001678 (shifted left once).
Labeled lone-child-avoiding rooted trees are counted by
A060356.
Matula-Goebel numbers of lone-child-avoiding rooted trees are
A291636.
-
b:= proc(n, i, k) option remember; `if`(n=0, 1, `if`(i<1, 0,
add(binomial(A(i, k)+j-1, j)*b(n-i*j, i-1, k), j=0..n/i)))
end:
A:= (n, k)-> `if`(n<2, n*k, b(n, n-1, k)):
T:= (n, k)-> add(A(n, k-j)*(-1)^j*binomial(k, j), j=0..k-1):
seq(seq(T(n, k), k=1..n), n=1..10); # Alois P. Heinz, Sep 18 2018
-
b[n_, i_, k_] := b[n, i, k] = If[n == 0, 1, If[i < 1, 0, Sum[Binomial[A[i, k] + j - 1, j] b[n - i j, i - 1, k], {j, 0, n/i}]]];
A[n_, k_] := If[n < 2, n k, b[n, n - 1, k]];
T[n_, k_] := Sum[(-1)^(k - i)*Binomial[k, i]*A[n, i], {i, 1, k}];
Table[T[n, k], {n, 1, 10}, {k, 1, n}] // Flatten (* Jean-François Alcover, Sep 24 2019, after Alois P. Heinz *)
sps[{}]:={{}};sps[set:{i_,_}]:=Join@@Function[s,Prepend[#,s]&/@sps[Complement[set,s]]]/@Cases[Subsets[set],{i,_}];
mps[set_]:=Union[Sort[Sort/@(#/.x_Integer:>set[[x]])]&/@sps[Range[Length[set]]]];
mtot[m_]:=Prepend[Join@@Table[Tuples[mtot/@p],{p,Select[mps[m],1Gus Wiseman, Dec 31 2020 *)
-
\\ here R(n,k) is k-th column of A319254.
EulerT(v)={Vec(exp(x*Ser(dirmul(v, vector(#v, n, 1/n))))-1, -#v)}
R(n, k)={my(v=[k]); for(n=2, n, v=concat(v, EulerT(concat(v, [0]))[n])); v}
M(n)={my(v=vector(n, k, R(n,k)~)); Mat(vector(n, k, sum(i=1, k, (-1)^(k-i)*binomial(k,i)*v[i])))}
{my(T=M(10)); for(n=1, #T~, print(T[n, ][1..n]))}
A256068
Number T(n,k) of rooted identity trees with n nodes and colored non-root nodes using exactly k colors; triangle T(n,k), n>=1, 0<=k<=n-1, read by rows.
Original entry on oeis.org
1, 0, 1, 0, 1, 3, 0, 2, 14, 16, 0, 3, 60, 174, 125, 0, 6, 254, 1434, 2464, 1296, 0, 12, 1087, 10746, 33362, 40455, 16807, 0, 25, 4742, 77556, 388312, 816535, 763104, 262144, 0, 52, 21020, 551460, 4191916, 13617210, 21501684, 16328620, 4782969
Offset: 1
T(4,2) = 14:
: 0 0 0 0 0 0 0 0
: | | | | | | | |
: 1 1 2 2 2 1 1 2
: | | | | | | / \ / \
: 1 2 1 2 1 2 1 2 1 2
: | | | | | |
: 2 1 1 1 2 1
:
: 0 0 0 0 0 0
: / \ / \ / \ / \ / \ / \
: 1 1 2 1 1 2 2 2 1 2 2 1
: | | | | | |
: 2 1 1 1 2 2
Triangle T(n,k) begins:
1;
0, 1;
0, 1, 3;
0, 2, 14, 16;
0, 3, 60, 174, 125;
0, 6, 254, 1434, 2464, 1296;
0, 12, 1087, 10746, 33362, 40455, 16807;
0, 25, 4742, 77556, 388312, 816535, 763104, 262144;
...
Main diagonal gives:
A000272 (for n>0).
-
with(numtheory):
A:= proc(n, k) option remember; `if`(n<2, n, add(A(n-j, k)*add(
k*A(d, k)*d*(-1)^(j/d+1), d=divisors(j)), j=1..n-1)/(n-1))
end:
T:= (n, k)-> add(A(n, k-i)*(-1)^i*binomial(k, i), i=0..k):
seq(seq(T(n, k), k=0..n-1), n=1..10);
-
A[n_, k_] := A[n, k] = If[n < 2, n, Sum[A[n - j, k] Sum[k A[d, k] d * (-1)^(j/d + 1), {d, Divisors[j]}], {j, 1, n - 1}]/(n - 1)];
T[n_, k_] := Sum[A[n, k - i] (-1)^i Binomial[k, i], {i, 0, k}];
Table[T[n, k], {n, 10}, {k, 0, n - 1}] // Flatten (* Jean-François Alcover, May 29 2020, after Maple *)
A038080
Number of identity trees with 3-colored nodes.
Original entry on oeis.org
1, 3, 3, 9, 39, 189, 981, 5490, 31674, 189954, 1170126, 7382745, 47494197, 310712808, 2061987642, 13855192866, 94113385437, 645424668666, 4464027720900, 31110200069511, 218292811705458, 1541172223659249
Offset: 0
A052772
Number of rooted identity trees with n nodes and 4-colored non-root nodes.
Original entry on oeis.org
0, 1, 4, 22, 156, 1193, 9748, 82916, 727088, 6524084, 59620732, 552970626, 5191935808, 49252903050, 471358286352, 4545310993994, 44121116086052, 430777978197156, 4227634212037728, 41680927531643928, 412638233333973820, 4100336181515969163, 40882494461218775272
Offset: 0
encyclopedia(AT)pommard.inria.fr, Jan 25 2000
-
spec := [S,{S=Prod(Z,B,B,B,B),B=PowerSet(S)},unlabeled]: seq(combstruct[count](spec,size=n), n=0..20);
A255523
Number of rooted identity trees with n n-colored non-root nodes.
Original entry on oeis.org
1, 1, 5, 64, 1193, 30526, 991264, 39156244, 1824927697, 98125181461, 5983042467096, 408095177801851, 30797863537552547, 2548357838769171131, 229445851718471852031, 22334471403618839348901, 2337414940442888593612961, 261737726746663069945238177
Offset: 0
a(2) = 5:
o o o o o
| | | | / \
1 1 2 2 1 2
| | | |
1 2 1 2
-
with(numtheory):
A:= proc(n, k) option remember; `if`(n<2, n, add(A(n-j, k)*add(
k*A(d, k)*d*(-1)^(j/d+1), d=divisors(j)), j=1..n-1)/(n-1))
end:
a:= n-> A(n+1, n):
seq(a(n), n=0..25);
-
A[n_, k_] := A[n, k] = If[n < 2, n, Sum[A[n-j, k]*Sum[
k*A[d, k]*d*(-1)^(j/d+1), {d, Divisors[j]}], {j, 1, n-1}]/(n-1)];
a[n_] := A[n+1, n];
Table[a[n], {n, 0, 25}] (* Jean-François Alcover, Apr 29 2022, after Alois P. Heinz *)
Showing 1-10 of 16 results.
Comments