A038049
Number of labeled rooted trees with 2-colored leaves.
Original entry on oeis.org
2, 4, 24, 224, 2880, 47232, 942592, 22171648, 600698880, 18422374400, 630897721344, 23864653578240, 988197253808128, 44460603225407488, 2159714024218951680, 112652924603290615808, 6280048587936003784704, 372616014329572403183616, 23445082059018189741752320
Offset: 1
- F. Bergeron, G. Labelle and P. Leroux, Combinatorial Species and Tree-Like Structures, Cambridge, 1998, p. 185 (3.1.83)
-
a:= n-> add(binomial(n, k)*(n-k)^(n-1), k=0..n):
seq(a(n), n=1..20); # Alois P. Heinz, Nov 30 2012
-
Table[n!*Sum[2^j/j!*StirlingS2[n-1,n-j],{j,1,n}],{n,1,20}] (* Vaclav Kotesovec, Nov 30 2012 *)
A229892
Number T(n,k) of k up, k down permutations of [n]; triangle T(n,k), n>=0, 0<=k<=n, read by rows.
Original entry on oeis.org
1, 1, 1, 0, 1, 1, 0, 2, 1, 1, 0, 5, 3, 1, 1, 0, 16, 6, 4, 1, 1, 0, 61, 26, 10, 5, 1, 1, 0, 272, 71, 20, 15, 6, 1, 1, 0, 1385, 413, 125, 35, 21, 7, 1, 1, 0, 7936, 1456, 461, 70, 56, 28, 8, 1, 1, 0, 50521, 10576, 1301, 574, 126, 84, 36, 9, 1, 1
Offset: 0
Triangle T(n,k) begins:
1;
1, 1;
0, 1, 1;
0, 2, 1, 1;
0, 5, 3, 1, 1;
0, 16, 6, 4, 1, 1;
0, 61, 26, 10, 5, 1, 1;
0, 272, 71, 20, 15, 6, 1, 1;
0, 1385, 413, 125, 35, 21, 7, 1, 1;
-
b:= proc(u, o, t, k) option remember; `if`(u+o=0, 1, add(`if`(t=k,
b(o-j, u+j-1, 1, k), b(u+j-1, o-j, t+1, k)), j=1..o))
end:
T:= (n, k)-> `if`(k+1>=n, 1, `if`(k=0, 0, b(0, n, 0, k))):
seq(seq(T(n, k), k=0..n), n=0..10);
-
b[u_, o_, t_, k_] := b[u, o, t, k] = If[u+o == 0, 1, Sum[If[t == k, b[o-j, u+j-1, 1, k], b[u+j-1, o-j, t+1, k]], {j, 1, o}]]; t[n_, k_] := If[k+1 >= n, 1, If[k == 0, 0, b[0, n, 0, k]]]; Table[Table[t[n, k], {k, 0, n}], {n, 0, 10}] // Flatten (* Jean-François Alcover, Dec 17 2013, translated from Maple *)
A316101
Sequence a_k of column k shifts left when Weigh transform is applied k times with a_k(n) = n for n<2; square array A(n,k), n>=0, k>=0, read by antidiagonals.
Original entry on oeis.org
0, 0, 1, 0, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 1, 2, 1, 0, 1, 1, 1, 3, 3, 1, 0, 1, 1, 1, 4, 6, 6, 1, 0, 1, 1, 1, 5, 10, 16, 12, 1, 0, 1, 1, 1, 6, 15, 32, 43, 25, 1, 0, 1, 1, 1, 7, 21, 55, 105, 120, 52, 1, 0, 1, 1, 1, 8, 28, 86, 210, 356, 339, 113, 1, 0, 1, 1, 1, 9, 36, 126, 371, 826, 1227, 985, 247, 1
Offset: 0
Square array A(n,k) begins:
0, 0, 0, 0, 0, 0, 0, 0, 0, ...
1, 1, 1, 1, 1, 1, 1, 1, 1, ...
1, 1, 1, 1, 1, 1, 1, 1, 1, ...
1, 1, 1, 1, 1, 1, 1, 1, 1, ...
1, 2, 3, 4, 5, 6, 7, 8, 9, ...
1, 3, 6, 10, 15, 21, 28, 36, 45, ...
1, 6, 16, 32, 55, 86, 126, 176, 237, ...
1, 12, 43, 105, 210, 371, 602, 918, 1335, ...
1, 25, 120, 356, 826, 1647, 2961, 4936, 7767, ...
- Alois P. Heinz, Antidiagonals n = 0..140, flattened
- M. Bernstein and N. J. A. Sloane, Some canonical sequences of integers, Linear Alg. Applications, 226-228 (1995), 57-72; erratum 320 (2000), 210. [Link to arXiv version]
- M. Bernstein and N. J. A. Sloane, Some canonical sequences of integers, Linear Alg. Applications, 226-228 (1995), 57-72; erratum 320 (2000), 210. [Link to Lin. Alg. Applic. version together with omitted figures]
Columns k=0-10 give:
A057427,
A004111,
A007561,
A316103,
A316104,
A316105,
A316106,
A316107,
A316108,
A316109,
A316110.
-
wtr:= proc(p) local b; b:= proc(n, i) option remember;
`if`(n=0, 1, `if`(i<1, 0, add(binomial(p(i), j)*
b(n-i*j, i-1), j=0..n/i))) end: j-> b(j$2)
end:
g:= proc(k) option remember; local b, t; b[0]:= j->
`if`(j<2, j, b[k](j-1)); for t to k do
b[t]:= wtr(b[t-1]) od: eval(b[0])
end:
A:= (n, k)-> g(k)(n):
seq(seq(A(n, d-n), n=0..d), d=0..14);
-
wtr[p_] := Module[{b}, b[n_, i_] := b[n, i] = If[n == 0, 1, If[i < 1, 0, Sum[Binomial[p[i], j]*b[n - i*j, i - 1], {j, 0, n/i}]]]; b[#, #]&];
g[k_] := g[k] = Module[{b, t}, b[0][j_] := If[j < 2, j, b[k][j - 1]]; For[ t = 1, t <= k + 1, t++, b[t] = wtr[b[t - 1]]]; b[0]];
A[n_, k_] := g[k][n];
Table[A[n, d-n], {d, 0, 14}, {n, 0, d}] // Flatten (* Jean-François Alcover, Jul 10 2018, after Alois P. Heinz *)
A007472
Shifts 2 places left when binomial transform is applied twice with a(0) = a(1) = 1.
Original entry on oeis.org
1, 1, 1, 3, 9, 29, 105, 431, 1969, 9785, 52145, 296155, 1787385, 11428949, 77124569, 546987143, 4062341601, 31502219889, 254500383457, 2137863653811, 18639586581097, 168387382189709, 1573599537048265, 15189509662516063, 151243491212611217, 1551565158004180137
Offset: 0
- 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..576
- M. Bernstein and N. J. A. Sloane, Some canonical sequences of integers, arXiv:math/0205301 [math.CO], 2002; Linear Alg. Applications, 226-228 (1995), 57-72; erratum 320 (2000), 210. [Link to arXiv version]
- M. Bernstein and N. J. A. Sloane, Some canonical sequences of integers, Linear Alg. Applications, 226-228 (1995), 57-72; erratum 320 (2000), 210. [Link to Lin. Alg. Applic. version together with omitted figures]
- N. J. A. Sloane, Transforms
-
bintr:= proc(p) local b;
b:= proc(n) option remember; add(p(k)*binomial(n,k), k=0..n) end
end:
b:= (bintr@@2)(a):
a:= n-> `if`(n<2, 1, b(n-2)):
seq(a(n), n=0..30); # Alois P. Heinz, Oct 18 2012
-
bintr[p_] := Module[{b}, b[n_] := b[n] = Sum [p[k]*Binomial[n, k], {k, 0, n}]; b]; b = a // bintr // bintr; a[n_] := If[n<2, 1, b[n-2]]; Table[a[n], {n, 0, 25}] (* Jean-François Alcover, Jan 27 2014, after Alois P. Heinz *)
(* another program *)
B[x_] := (BesselK[0, 1] + BesselK[1, 1])*BesselI[0, Exp[x]] + (BesselI[1, 1] - BesselI[0, 1])*BesselK[0, Exp[x]];
a[n_] := SeriesCoefficient[FullSimplify[Series[B[x], {x, 0, n}]],n] n!
Table[a[n], {n, 0, 30}] (* Ven Popov, Apr 25 2025 *)
A049075
Eigensequence of a power series transformation.
Original entry on oeis.org
1, 1, 2, 4, 8, 18, 43, 102, 247, 617, 1564, 4003, 10355, 27051, 71225, 188743, 503111, 1348301, 3630294, 9815159, 26637436, 72540432, 198162708, 542875096, 1491126550, 4105602719, 11329408543, 31328137525, 86795258650, 240898943969, 669730499207, 1864855943748
Offset: 1
x + x^2 + 2*x^3 + 4*x^4 + 8*x^5 + 18*x^6 + 43*x^7 + 102*x^8 + 247*x^9 + 617*x^10 + ...
-
with(numtheory): etr:= proc(p) local b; b:= proc(n) option remember; if n=0 then 1 else (add(d*p(d), d=divisors(n)) +add(add(d*p(d), d=divisors(j)) *b(n-j), j=1..n-1))/n fi end end: b:= etr(n-> a(n) -`if`(modp(n,4)<>0, 0,a(n/2))): a:= n-> b(n-1): seq(a(n), n=1..40); # Alois P. Heinz, Sep 06 2008
-
s[ n_, k_ ] := s[ n, k ]=a[ n+1-k ]+If[ n<2k, 0, -s[ n-k, k ](-1)^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} ]
-
{a(n) = local(A=x); if( n<1, 0, for( k=1, n-1, A *= (1 + (-x)^k + x*O(x^n))^((-1)^k * polcoeff(A, k))); polcoeff(A, n))}
A316074
Sequence a_k of column k shifts left k places under Weigh transform and equals signum(n) for n=1, 1<=k<=n, read by rows.
Original entry on oeis.org
1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 3, 2, 1, 1, 1, 6, 2, 2, 1, 1, 1, 12, 4, 2, 2, 1, 1, 1, 25, 6, 3, 2, 2, 1, 1, 1, 52, 10, 5, 3, 2, 2, 1, 1, 1, 113, 17, 7, 4, 3, 2, 2, 1, 1, 1, 247, 29, 10, 6, 4, 3, 2, 2, 1, 1, 1, 548, 51, 17, 8, 5, 4, 3, 2, 2, 1, 1, 1, 1226, 89, 26, 12, 7, 5, 4, 3, 2, 2, 1, 1, 1
Offset: 1
Triangle T(n,k) begins:
1;
1, 1;
1, 1, 1;
2, 1, 1, 1;
3, 2, 1, 1, 1;
6, 2, 2, 1, 1, 1;
12, 4, 2, 2, 1, 1, 1;
25, 6, 3, 2, 2, 1, 1, 1;
52, 10, 5, 3, 2, 2, 1, 1, 1;
113, 17, 7, 4, 3, 2, 2, 1, 1, 1;
- Alois P. Heinz, Rows n = 1..200, flattened
- M. Bernstein and N. J. A. Sloane, Some canonical sequences of integers, Linear Alg. Applications, 226-228 (1995), 57-72; erratum 320 (2000), 210. [Link to arXiv version]
- M. Bernstein and N. J. A. Sloane, Some canonical sequences of integers, Linear Alg. Applications, 226-228 (1995), 57-72; erratum 320 (2000), 210. [Link to Lin. Alg. Applic. version together with omitted figures]
-
b:= proc(n, i, k) option remember; `if`(n=0, 1, `if`(i<1, 0,
add(binomial(T(i, k), j)*b(n-i*j, i-1, k), j=0..n/i)))
end:
T:= (n, k)-> `if`(n
-
b[n_, i_, k_] := b[n, i, k] = If[n == 0, 1, If[i < 1, 0, Sum[Binomial[T[i, k], j]*b[n - i*j, i - 1, k], {j, 0, n/i}]]];
T[n_, k_] := If[n < k, Sign[n], b[n - k, n - k, k]];
Table[T[n, k], {n, 1, 16}, {k, 1, n}] // Flatten (* Jean-François Alcover, Jul 10 2018, after Alois P. Heinz *)
A000237
Number of mixed Husimi trees with n nodes; or rooted polygonal cacti with bridges.
Original entry on oeis.org
0, 1, 1, 3, 8, 26, 84, 297, 1066, 3976, 15093, 58426, 229189, 910127, 3649165, 14756491, 60103220, 246357081, 1015406251, 4205873378, 17497745509, 73084575666, 306352303774, 1288328048865, 5433980577776, 22982025183983
Offset: 0
- N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
- N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
-
BIK(p)={(1/(1-p) + (1+p)/subst(1-p, x, x^2))/2}
EulerT(v)={Vec(exp(x*Ser(dirmul(v,vector(#v,n,1/n))))-1, -#v)}
seq(n)={my(v=[0]); for(n=1, n, v=concat([0,1], EulerT(Vec(BIK(Ser(v))-1)))); v} \\ Andrew Howroyd, Aug 30 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 */
A007554
Unique attractor for (RIGHT then MOBIUS) transform.
Original entry on oeis.org
1, 1, 0, -1, -2, -3, -3, -4, -3, -3, -1, -2, 3, 2, 5, 8, 12, 11, 17, 16, 21, 25, 26, 25, 30, 32, 29, 32, 32, 31, 30, 29, 21, 23, 11, 17, 5, 4, -13, -15, -28, -29, -52, -53, -76, -78, -104, -105, -142, -139, -168, -179, -209, -210, -253, -249, -278, -294
Offset: 1
- N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
- Franklin T. Adams-Watters, Table of n, a(n) for n = 1..5000
- M. Bernstein and N. J. A. Sloane, Some canonical sequences of integers, Linear Alg. Applications, 226-228 (1995), 57-72; erratum 320 (2000), 210. [Link to arXiv version]
- M. Bernstein and N. J. A. Sloane, Some canonical sequences of integers, Linear Alg. Applications, 226-228 (1995), 57-72; erratum 320 (2000), 210. [Link to Lin. Alg. Applic. version together with omitted figures]
- N. J. A. Sloane, Transforms
-
import Data.List (genericIndex)
a007554 n = genericIndex a007554_list (n-1)
a007554_list = 1 : f 1 where
f x = (sum $ zipWith (*) (map a008683 divs)
(map a007554 $ reverse divs)) : f (x + 1)
where divs = a027750_row x
-- Reinhard Zumkeller, Mar 16 2013
-
a[n_] := a[n] = Sum[ MoebiusMu[ (n - 1)/d]*a[d], {d, Divisors[n - 1]}]; a[1] = 1; Table[a[n], {n, 1, 58}] (* Jean-François Alcover, Jan 04 2012, from formula *)
A055327
Triangle of rooted identity trees with n nodes and k leaves.
Original entry on oeis.org
1, 1, 1, 1, 1, 1, 2, 1, 4, 1, 1, 6, 5, 1, 9, 13, 2, 1, 12, 28, 11, 1, 16, 53, 40, 3, 1, 20, 91, 109, 26, 1, 25, 146, 254, 116, 6, 1, 30, 223, 524, 387, 61, 1, 36, 326, 998, 1068, 329, 12, 1, 42, 461, 1774, 2587, 1289, 145, 1, 49, 634, 2995, 5678, 4133, 911, 25, 1, 56
Offset: 1
Triangle begins:
1;
1;
1;
1, 1;
1, 2;
1, 4, 1;
1, 6, 5;
1, 9, 13, 2;
1, 12, 28, 11;
1, 16, 53, 40, 3;
...
From _Joerg Arndt_, Aug 18 2014: (Start)
The identity trees with n=6 nodes, as (preorder-) level sequences, together with their number of leaves, and an ASCII rendering, are:
:
: 1: [ 0 1 2 3 4 5 ] 1
: O--o--o--o--o--o
:
: 2: [ 0 1 2 3 4 3 ] 2
: O--o--o--o--o
: .--o
:
: 3: [ 0 1 2 3 4 2 ] 2
: O--o--o--o--o
: .--o
:
: 4: [ 0 1 2 3 4 1 ] 2
: O--o--o--o--o
: .--o
:
: 5: [ 0 1 2 3 2 1 ] 3
: O--o--o--o
: .--o
: .--o
:
: 6: [ 0 1 2 3 1 2 ] 2
: O--o--o--o
: .--o--o
:
This gives [1, 4, 1], row n=6 of the triangle.
(End)
-
WeighMT(u)={my(n=#u, p=x*Ser(u), vars=variables(p)); Vec(exp( sum(i=1, n, (-1)^(i-1)*substvec(p + O(x*x^(n\i)), vars, apply(v->v^i,vars))/i ))-1)}
A(n)={my(v=[y]); for(n=2, n, v=concat([y], WeighMT(v))); apply(p->Vecrev(p/y), v)}
{ my(T=A(15)); for(n=1, #T, print(T[n])) } \\ Andrew Howroyd, Aug 28 2018
Comments