A000951
Number of forests with n nodes and height at most 4.
Original entry on oeis.org
1, 3, 16, 125, 1296, 16087, 229384, 3687609, 66025360, 1303751051, 28151798544, 659841763957, 16681231615816, 452357366282655, 13095632549137576, 403040561722348913, 13138626717852194976, 452179922268565180819, 16381932383826669204640
Offset: 1
- 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).
-
nn = 20; Range[0, nn]! CoefficientList[Series[Exp[x*Exp[x*Exp[x*Exp[x*Exp[x]]]]], {x, 0, nn}], x] (* T. D. Noe, Jun 21 2012 *)
A060905
Expansion of e.g.f. exp(x*exp(x) + 1/2*x^2*exp(x)^2).
Original entry on oeis.org
1, 1, 4, 19, 110, 751, 5902, 52165, 509588, 5437729, 62828306, 780287839, 10351912276, 145944541159, 2176931651546, 34225419288421, 565282627986368, 9779830102138945, 176776613812205074, 3330780287838743575
Offset: 0
- I. P. Goulden and D. M. Jackson, Combinatorial Enumeration, Wiley, N.Y., 1983.
-
nn=20;a=x Exp[x];Range[0,nn]!CoefficientList[Series[Exp[a+a^2/2],{x,0,nn}],x] (* Geoffrey Critzer, Sep 18 2012 *)
-
a(n):=sum(sum(k^(n-k)/(n-k)!*binomial(m,k-m)*(1/2)^(k-m),k,m,n)/m!,m,1,n); /* Vladimir Kruchinin, Aug 20 2010 */
A060913
E.g.f.: exp(x*exp(x*exp(x*exp(x))) + 1/3*x^3*exp(x*exp(x*exp(x)))^3).
Original entry on oeis.org
1, 1, 3, 18, 157, 1656, 20727, 300784, 4955337, 91229616, 1853584651, 41147256624, 989990665677, 25647894553048, 711630284942319, 21049888453838136, 661180220075555473, 21976354057916680416
Offset: 0
- I. P. Goulden and D. M. Jackson, Combinatorial Enumeration, Wiley, N.Y., 1983.
-
nn=20; a=x Exp[x]; b=x Exp[a]; c=x Exp[b]; t=Sum[n^(n-1)x^n/n!, {n, 1, nn}]; Range[0,nn]! CoefficientList[Series[Exp[c+c^3/3], {x, 0, nn}], x] (* Geoffrey Critzer, Sep 23 2012 *)
A187761
Number of maps f: [n] -> [n] with f(x)<=x and f(f(x)) = f(f(f(x))).
Original entry on oeis.org
1, 1, 2, 6, 23, 106, 568, 3459, 23544, 176850, 1451253, 12904312, 123489888, 1264591561, 13790277294, 159466823794, 1948259002647, 25066729706582, 338670605492700, 4792623436607059, 70873649458154500, 1092969062435462254, 17543703470388927229, 292600906102204630092
Offset: 0
There are a(4)=23 such maps f: [0,1,2,3] -> [0,1,2,3], all 4-digit mixed-radix numbers [f(0), f(1), f(2), f(3)] where 0 <= f(k) <= k (rising factorial basis) except for [ 0 0 1 2 ], as f(3)=2 and f(f(3)) = f(2) = 1 != f(f(f(3))) = f(f(2)) = f(1) = 0.
The exception corresponds to the tree 0 -- 1 -- 2 -- 3 (0 is the root), which can be identified with the map [1,2,3,4] -> [0,1,2,3] where f(k)=k-1.
Cf.
A000110 (Number of maps f: [n] -> [n] where f(x)<=x and f(f(x))=f(x) ).
Cf.
A179455 (permutation trees of power n and height <= k+1 ).
Cf.
A000949 (maps f: [n] -> [n] where f(f(x)) = f(f(f(x))) ).
-
b:= proc(n, x, y) option remember; `if`(n=0, 1,
b(n-1, x+1, y) +x*b(n-1, x, y+1) +y*b(n-1, x, y))
end:
a:= n-> b(n, 0, 0):
seq(a(n), n=0..25); # Alois P. Heinz, Jan 09 2013
# The function BellMatrix is defined in A264428.
B := BellMatrix(n -> combinat:-bell(n), 24):
seq(add(i, i=LinearAlgebra:-Row(B,n)), n=1..24); # Peter Luschny, Jan 23 2016
# alternative Maple program:
b:= proc(n, h) option remember; `if`(min(n, h)=0, 1, add(
binomial(n-1, j-1)*b(j-1, h-1)*b(n-j, h), j=1..n))
end:
a:= n-> b(n, 2):
seq(a(n), n=0..25); # Alois P. Heinz, Aug 21 2017
-
b[n_, x_, y_] := b[n, x, y] = If[n == 0, 1, b[n-1, x+1, y]+x*b[n-1, x, y+1]+y*b[n-1, x, y]]; a[n_] := b[n, 0, 0]; Table[a[n], {n, 0, 23}] (* Jean-François Alcover, Feb 25 2014, after Alois P. Heinz *)
Table[Sum[BellY[n, k, BellB[Range[n] - 1]], {k, 0, n}], {n, 0, 20}] (* Vladimir Reshetnikov, Nov 09 2016 *)
-
/* using e.g.f. A(x) */
x = 'x + O('x^66);
B = exp( exp(x) - 1 ); /* e.g.f. of Bell numbers */
A = serconvol( x * B, -log(1-x) );
/* A = intformal(B) */ /* alternative to last line */
A = exp( A );
Vec( serlaplace( A ) )
-
from sympy.core.cache import cacheit
from sympy import binomial
@cacheit
def b(n, h): return 1 if min(n, h)==0 else sum([binomial(n - 1, j - 1)*b(j - 1, h - 1)*b(n - j, h) for j in range(1, n + 1)])
def a(n): return b(n, 2)
print([a(n) for n in range(31)]) # Indranil Ghosh, Aug 21 2017, after second Maple program by Alois P. Heinz
A235328
Number of ordered pairs of endofunctions (f,g) on a set of n elements satisfying f(x) = g(f(f(x))).
Original entry on oeis.org
1, 1, 6, 69, 1336, 39145, 1598256, 85996561, 5872177536, 494848403793, 50333180780800, 6068500612311841, 854434117410352128, 138752719761249646585, 25714777079368557164544, 5389541081414619785888625, 1267387594395443339970052096, 332074775201035547446532113825
Offset: 0
-
a:= proc(n) option remember; local b; b:=
proc(m, i) option remember; `if`(m=0, n^i, `if`(i<1, 0,
add(b(m-j, i-1)*binomial(m, j)*j, j=0..m)))
end: forget(b):
b(n$2)
end:
seq(a(n), n=0..20); # Alois P. Heinz, Jul 23 2014
-
a[n_] := If[n==0, 1, Sum[k! Binomial[n, k] (n k)^(n - k), {k, 1, n}]]
Table[a[n],{n,20}] (* David Einstein, Oct 10 2016 *)
A210725
Triangle read by rows: T(n,k) = number of forests of labeled rooted trees with n nodes and height at most k (n>=1, 0<=k<=n-1).
Original entry on oeis.org
1, 1, 3, 1, 10, 16, 1, 41, 101, 125, 1, 196, 756, 1176, 1296, 1, 1057, 6607, 12847, 16087, 16807, 1, 6322, 65794, 160504, 229384, 257104, 262144, 1, 41393, 733833, 2261289, 3687609, 4480569, 4742649, 4782969, 1, 293608, 9046648, 35464816, 66025360, 87238720, 96915520, 99637120, 100000000
Offset: 1
Triangle begins:
1;
1, 3;
1, 10, 16;
1, 41, 101, 125;
1, 196, 756, 1176, 1296;
1, 1057, 6607, 12847, 16087, 16807;
...
-
f:= proc(k) f(k):= `if`(k<0, 1, exp(x*f(k-1))) end:
T:= (n, k)-> coeff(series(f(k), x, n+1), x, n) *n!:
seq(seq(T(n, k), k=0..n-1), n=1..9); # Alois P. Heinz, May 30 2012
# second Maple program:
T:= proc(n, h) option remember; `if`(min(n, h)=0, 1, add(
binomial(n-1, j-1)*j*T(j-1, h-1)*T(n-j, h), j=1..n))
end:
seq(seq(T(n, k), k=0..n-1), n=1..10); # Alois P. Heinz, Aug 21 2017
-
f[?Negative] = 1; f[k] := Exp[x*f[k-1]]; t[n_, k_] := Coefficient[Series[f[k], {x, 0, n+1}], x, n]*n!; Table[Table[t[n, k], {k, 0, n-1}], {n, 1, 9}] // Flatten (* Jean-François Alcover, Oct 30 2013, after Maple *)
-
from sympy.core.cache import cacheit
from sympy import binomial
@cacheit
def T(n, h): return 1 if min(n, h)==0 else sum([binomial(n - 1, j - 1)*j*T(j - 1, h - 1)*T(n - j, h) for j in range(1, n + 1)])
for n in range(1, 11): print([T(n, k) for k in range(n)]) # Indranil Ghosh, Aug 21 2017, after second Maple code
A231091
Number of distinct (modulo rotation) unicursal star polygons (not necessarily regular, no edge joins adjacent vertices) that can be formed by connecting the vertices of a regular n-gon.
Original entry on oeis.org
0, 0, 0, 0, 1, 1, 5, 27, 175, 1533, 14361, 151575, 1735869, 21594863, 289365383, 4158887007, 63822480809, 1041820050629, 18027531255745, 329658402237171, 6352776451924233, 128686951765990343, 2733851297673484765, 60781108703102022027, 1411481990523638719737
Offset: 1
For n=5, only solution is the regular pentagram.
For n=6, only solution is the unicursal hexagram (see Wikipedia link).
For n=7, two regular heptagrams and three irregular forms are possible.
-
\\ Requires a370068 from A370068, b(n) is A283184.
b(n)={subst(serlaplace(polcoef((1 - x)/(1 + (1 - 2*y)*x + 2*y*x^2) + O(x*x^n), n)), y, 1)}
a(n)={(if(n%2==0 && n > 2, b(n/2-1)/2) + a370068(n))/2} \\ Andrew Howroyd, Mar 01 2024
A000950
Number of forests with n nodes and height at most 3.
Original entry on oeis.org
1, 3, 16, 125, 1176, 12847, 160504, 2261289, 35464816, 612419291, 11539360944, 235469524237, 5170808565976, 121535533284999, 3043254281853496, 80852247370051793, 2270951670959226336, 67221368736302224819, 2091039845329887687136
Offset: 1
- 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).
-
nn = 20; Range[0, nn]! CoefficientList[Series[Exp[x*Exp[x*Exp[x*Exp[x]]]], {x, 0, nn}], x] (* T. D. Noe, Jun 21 2012 *)
A239749
Number of ordered pairs of functions f,g on a set of n elements into itself satisfying f(f(x)) = g(f(g(x))).
Original entry on oeis.org
1, 1, 6, 87, 2056, 69605, 3201696, 190933435
Offset: 0
a(0) = a(1) = 1 since there is only one endofunction for n=0 or 1 and the equation is satisfied trivially. For n=2, each endofunction f on {1,2} is represented by [f(1),f(2)]. The list of a(2) = 6 pairs (f,g) which satisfy the equation is ([1,1], [1,1]), ([1,1], [1,2]), ([1,2], [1,2]), ([1,2], [2,1]), ([2,2], [1,2]), ([2,2], [2,2]). - _Michael Somos_, Mar 26 2014
A239750
Number of ordered pairs of endofunctions (f,g) on a set of n elements satisfying g(f(x)) = f(f(f(x))).
Original entry on oeis.org
1, 1, 6, 87, 2200, 84245, 4492656, 315937195, 28186856832, 3099006365769, 410478164588800, 64323095036300111, 11748771067445148672, 2470422069374379054493, 591735532838657160296448, 160004357420756572368889875, 48458574881000820765562863616
Offset: 0
-
a:= n-> add(binomial(n, k)*k^n*(n-1)^(n-k), k=0..n):
seq(a(n), n=0..20); # Alois P. Heinz, Jul 23 2014
-
a[n_] := If[n<2, 1, Sum[Binomial[n, k]*k^n*(n-1)^(n-k), {k, 0, n}]];
a /@ Range[0, 20] (* Jean-François Alcover, Oct 03 2019, after Alois P. Heinz *)
Showing 1-10 of 32 results.
Comments