A006153
E.g.f.: 1/(1-x*exp(x)).
Original entry on oeis.org
1, 1, 4, 21, 148, 1305, 13806, 170401, 2403640, 38143377, 672552730, 13044463641, 276003553860, 6326524990825, 156171026562838, 4130464801497105, 116526877671782896, 3492868475952497313, 110856698175372359346, 3713836169709782989993, 130966414749485504586940
Offset: 0
a(3) = 21 since there are 21 ways to assign 3 people into labeled groups with designated leaders. If there is one group, there are 3 ways to select a leader from the 3 people in the group. If there are two groups (group 1 and group 2), there are 6 ways to assign leaders and then 2 ways to select a group for the remaining person, and thus there are 12 assignments. If there are three groups (group1, group 2, and group3), each person is a leader of their singleton group, and there are 6 ways to assign the 3 people to the 3 groups. Hence a(3) = 3 + 12 + 6 = 21.
a(4) = 148 = 4 + 48 + 72 + 24.
- S. Ramanujan, Notebooks, Tata Institute of Fundamental Research, Bombay 1957 Vol. 2, see page 22.
- N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
- R. P. Stanley, Enumerative Combinatorics, Cambridge, Vol. 2, 1999; see Problem 5.32(d).
-
a := proc(n) local k; add(k^(n-k)*n!/(n-k)!,k=1..n); end; # for n >= 1
-
With[{nn=20},CoefficientList[Series[1/(1-x Exp[x]),{x,0,nn}],x] Range[0,nn]!] (* Harvey P. Dale, Aug 29 2012 *)
a[ n_] := If[n < 0, 0, n! + n! Sum[(n - k)^k / k!, {k, n}]]; (* Michael Somos, Jan 21 2019 *)
-
x='x+O('x^66);
egf=1/(1-x*exp(x)); /* = 1 + x + 2*x^2 + 7/2*x^3 + 37/6*x^4 + 87/8*x^5 +... */
Vec(serlaplace(egf)) /* Joerg Arndt, Apr 30 2011 */
-
{a(n) = if(n<0, 0, n! * sum(k=0, n, (n-k)^k / k!))}; /* Michael Somos, Jan 21 2019 */
-
def A006153_list(len):
f, R, C = 1, [1], [1]+[0]*(len-1)
for n in (1..len-1):
f *= n
for k in range(n, 0, -1):
C[k] = -C[k-1]*(1/(k-1) if k>1 else 1)
C[0] = sum((-1)^k*C[k] for k in (1..n))
R.append(C[0]*f)
return R
print(A006153_list(20)) # Peter Luschny, Feb 21 2016
A006154
Number of labeled ordered partitions of an n-set into odd parts.
Original entry on oeis.org
1, 1, 2, 7, 32, 181, 1232, 9787, 88832, 907081, 10291712, 128445967, 1748805632, 25794366781, 409725396992, 6973071372547, 126585529106432, 2441591202059281, 49863806091395072, 1074927056650469527, 24392086908129247232, 581176736647853024581
Offset: 0
- N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
- Vincenzo Librandi, Table of n, a(n) for n = 0..200
- Farid Aliniaeifard and Shu Xiao Li, Peak algebra in noncommuting variables, arXiv:2506.12868 [math.CO], 2025. See pp. 2, 9, 45.
- Philippe Flajolet, Symbolic Enumerative Combinatorics and Complex Asymptotic Analysis, Algorithms Seminar 2000-2001, F. Chyzak (ed.), INRIA, (2002), pp. 161-170.
- S. Getu and L. W. Shapiro, Combinatorial view of the composition of functions, Ars Combin. 10 (1980), 131-145. (Annotated scanned copy)
- Prabha Sivaraman Nair and Rejikumar Karunakaran, On k-Fibonacci Brousseau Sums, J. Int. Seq. (2024) Art. No. 24.6.4. See p. 8.
-
readlib(coeftayl):
with(combinat, bell);
A:=series(1/(1-sinh(x)),x,20);
G(x):=A : f[0]:=G(x): for n from 0 to 21 do f[n]:=coeftayl(G(x), x=0, n);;
p[n]:=f[n]*((n)!) od: x:=0:seq(p[n], n=0..20); # Sergei N. Gladkovskii, Jun 01 2012
# second Maple program:
a:= proc(n) option remember; `if`(n=0, 1, add((i->
a(n-i)*binomial(n, i))(2*j+1), j=0..(n-1)/2))
end:
seq(a(n), n=0..23); # Alois P. Heinz, Feb 01 2022
-
a[n_] := Sum[ (-1)^i*(k - 2*i)^n*Binomial[k, i]/2^k, {k, 1, n}, {i, 0, k}]; a[0] = 1; Table[a[n], {n, 0, 19}] (* Jean-François Alcover, Dec 07 2011, after Vladimir Kruchinin *)
With[{nn=20},CoefficientList[Series[1/(1-Sinh[x]),{x,0,nn}],x]Range[0,nn]!] (* Harvey P. Dale, Nov 16 2012 *)
-
a(n):=sum(sum((-1)^i*(k-2*i)^n*binomial(k,i),i,0,k)/2^k,k,1,n); /* Vladimir Kruchinin, May 28 2011 */
-
a(n)=if(n<2,n>=0,sum(k=1,ceil(n/2),binomial(n,2*k-1)*a(n-2*k+1))) \\ Ralf Stephan
A006155
Expansion of e.g.f.: 1/(2-x-exp(x)).
Original entry on oeis.org
1, 2, 9, 61, 551, 6221, 84285, 1332255, 24066691, 489100297, 11044268633, 274327080611, 7433424980943, 218208342366093, 6898241919264181, 233651576126946103, 8441657595745501019, 324052733365292875025, 13171257161208184782225, 565092918793429218839307
Offset: 0
- N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
-
R:=PowerSeriesRing(Rationals(), 40);
Coefficients(R!(Laplace( 1/(2-x-Exp(x)) ))); // G. C. Greubel, Jan 09 2025
-
With[{nn=20},CoefficientList[Series[1/(2-x-E^x),{x,0,nn}],x] Range[0,nn]!] (* Harvey P. Dale, Apr 27 2018 *)
-
def A006155_list(prec):
P. = PowerSeriesRing(QQ, prec)
return P( 1/(2-x-exp(x)) ).egf_to_ogf().list()
print(A006155_list(40)) # G. C. Greubel, Jan 09 2025
A206703
Triangular array read by rows. T(n,k) is the number of partial permutations (injective partial functions) of {1,2,...,n} that have exactly k elements in a cycle. The k elements are not necessarily in the same cycle. A fixed point is considered to be in a cycle.
Original entry on oeis.org
1, 1, 1, 3, 2, 2, 13, 9, 6, 6, 73, 52, 36, 24, 24, 501, 365, 260, 180, 120, 120, 4051, 3006, 2190, 1560, 1080, 720, 720, 37633, 28357, 21042, 15330, 10920, 7560, 5040, 5040, 394353, 301064, 226856, 168336, 122640, 87360, 60480, 40320, 40320
Offset: 0
1;
1, 1;
3, 2, 2;
13, 9, 6, 6;
73, 52, 36, 24, 24;
501, 365, 260, 180, 120, 120;
4051, 3006, 2190, 1560, 1080, 720, 720;
...
- Mohammad K. Azarian, On the Fixed Points of a Function and the Fixed Points of its Composite Functions, International Journal of Pure and Applied Mathematics, Vol. 46, No. 1, 2008, pp. 37-44. Mathematical Reviews, MR2433713 (2009c:65129), March 2009. Zentralblatt MATH, Zbl 1160.65015.
- Mohammad K. Azarian, Fixed Points of a Quadratic Polynomial, Problem 841, College Mathematics Journal, Vol. 38, No. 1, January 2007, p. 60. Solution published in Vol. 39, No. 1, January 2008, pp. 66-67.
-
b:= proc(n) option remember; `if`(n=0, 1, add((p-> p+x^j*
coeff(p, x, 0))(b(n-j)*binomial(n-1, j-1)*j!), j=1..n))
end:
T:= n-> (p-> seq(coeff(p, x, i), i=0..n))(b(n)):
seq(T(n), n=0..10); # Alois P. Heinz, Feb 19 2022
-
nn = 7; a = 1/(1 - x); ay = 1/(1 - y x); f[list_] := Select[list, # > 0 &]; Map[f, Range[0, nn]! CoefficientList[Series[Exp[a x] ay, {x, 0, nn}], {x, y}]] // Flatten
A320264
Number T(n,k) of proper multisets of nonempty words with a total of n letters over k-ary alphabet such that all k letters occur at least once in the multiset; triangle T(n,k), n>=2, 1<=k<=n-1, read by rows.
Original entry on oeis.org
1, 1, 2, 3, 11, 9, 4, 38, 84, 52, 7, 125, 523, 766, 365, 10, 364, 2676, 7096, 7775, 3006, 16, 1041, 12435, 52955, 100455, 87261, 28357, 22, 2838, 54034, 348696, 1020805, 1497038, 1074766, 301064, 32, 7645, 225417, 2120284, 8995801, 19823964, 23605043, 14423564, 3549177
Offset: 2
T(2,1) = 1: {a,a}.
T(3,2) = 2: {a,a,b}, {a,b,b}.
T(4,3) = 9: {a,a,b,c}, {a,a,bc}, {a,a,cb}, {b,b,a,c}, {b,b,ac}, {b,b,ca}, {c,c,a,b}, {c,c,ab}, {c,c,ba}.
Triangle T(n,k) begins:
.
. .
. 1, .
. 1, 2, .
. 3, 11, 9, .
. 4, 38, 84, 52, .
. 7, 125, 523, 766, 365, .
. 10, 364, 2676, 7096, 7775, 3006, .
. 16, 1041, 12435, 52955, 100455, 87261, 28357, .
. 22, 2838, 54034, 348696, 1020805, 1497038, 1074766, 301064, .
-
h:= proc(n, i, k) option remember; `if`(n=0, 1, `if`(i<1, 0,
add(h(n-i*j, i-1, k)*binomial(k^i, j), j=0..n/i)))
end:
g:= proc(n, k) option remember; `if`(n=0, 1, add(add(
d*k^d, d=numtheory[divisors](j))*g(n-j, k), j=1..n)/n)
end:
T:= (n, k)-> add((-1)^i*(g(n, k-i)-h(n$2, k-i))*binomial(k, i), i=0..k):
seq(seq(T(n, k), k=1..n-1), n=2..12);
-
h[n_, i_, k_] := h[n, i, k] = If[n == 0, 1, If[i<1, 0,
Sum[h[n - i*j, i-1, k]*Binomial[k^i, j], {j, 0, n/i}]]];
g[n_, k_] := g[n, k] = If[n == 0, 1, Sum[Sum[
d*k^d, {d, Divisors[j]}]*g[n - j, k], {j, 1, n}]/n];
T[n_, k_] := Sum[(-1)^i*(g[n, k-i]-h[n, n, k-i])*Binomial[k, i], {i, 0, k}];
Table[Table[T[n, k], {k, 1, n - 1}], {n, 2, 12}] // Flatten (* Jean-François Alcover, Feb 13 2021, after Alois P. Heinz *)
A114329
Triangle T(n,k) is the number of partitions of an n-set into lists (cf. A000262) with k lists of size 1.
Original entry on oeis.org
1, 0, 1, 2, 0, 1, 6, 6, 0, 1, 36, 24, 12, 0, 1, 240, 180, 60, 20, 0, 1, 1920, 1440, 540, 120, 30, 0, 1, 17640, 13440, 5040, 1260, 210, 42, 0, 1, 183120, 141120, 53760, 13440, 2520, 336, 56, 0, 1, 2116800, 1648080, 635040, 161280, 30240, 4536, 504, 72, 0, 1
Offset: 0
Triangle begins:
1;
0, 1;
2, 0, 1;
6, 6, 0, 1;
36, 24, 12, 0, 1;
240, 180, 60, 20, 0, 1;
...
-
t:=taylor(exp(x/(1-x)+(y-1)*x),x,11):for n from 0 to 10 do for k from 0 to n do printf("%d, ",coeff(n!*coeff(t,x,n),y,k)): od: printf("\n"): od: # Nathaniel Johnston, Apr 27 2011
# second Maple program:
b:= proc(n) option remember; expand(`if`(n=0, 1, add(j!*
`if`(j=1, x, 1)*b(n-j)*binomial(n-1, j-1), j=1..n)))
end:
T:= n-> (p-> seq(coeff(p, x, i), i=0..n))(b(n)):
seq(T(n), n=0..10); # Alois P. Heinz, Feb 19 2022
-
nn = 10; Table[Take[(Range[0, nn]! CoefficientList[ Series[Exp[ x/(1 - x) - x + y x], {x, 0, nn}], {x, y}])[[i]], i], {i, 1, nn}] // Grid (* Geoffrey Critzer, Feb 19 2022 *)
A300159
Number of ways of converting one set of lists containing n elements to another set of lists containing n elements by removing the last element from one of the lists and either appending it to an existing list or treating it as a new list.
Original entry on oeis.org
0, 0, 4, 30, 240, 2140, 21300, 235074, 2853760, 37819800, 543445380, 8416452550, 139753069104, 2476581106740, 46648575724660, 930581784937770, 19597766647728000, 434455097953799344, 10112163333554834820, 246539064280189932270, 6282671083849941925360
Offset: 0
a(0) = 0 since for 0 lists, 0 conversions are possible.
a(1) = 0 since for the 1 set of 1 list of length 1, there exist no possible conversions.
a(2) = 4 since for the 2 sets of 1 list of length 2, there exists only 1 conversion, and for the 1 set of 2 lists of length 1, there exist 2 conversions.
a(3) = 30 since for the 6 sets of 1 list of length 3, there exists 1 conversion, for the 6 sets of 1 list of length 2 and 1 list of length 1, there exist 3 conversions, and for the 1 set of 3 lists of length 1, there exists 6 conversions.
Extends
A000262 to count conversions in addition to sets of lists.
-
l:= func< n,b | Evaluate(LaguerrePolynomial(n,1), b) >;
[0,0,4]cat[Factorial(n)*( 2*l(n-2,-1) - l(n-3,-1) ): n in [3..30]]; // G. C. Greubel, Mar 09 2021
-
b:= proc(n, t, c) option remember; `if`(n=0, t^2-c, add(j!*
binomial(n-1, j-1)*b(n-j, t+1, c+`if`(j=1, 1, 0)), j=1..n))
end:
a:= n-> b(n, 0$2):
seq(a(n), n=0..25); # Alois P. Heinz, Mar 05 2018
# second Maple program:
a:= proc(n) option remember; `if`(n<6, [0$2, 4, 30, 240, 2140][n+1],
(n*(2*n^2-13*n+16)*a(n-1)-n*(n-1)*(n-3)*(n-4)*a(n-2))/((n-2)*(n-5)))
end:
seq(a(n), n=0..25); # Alois P. Heinz, Mar 05 2018
-
(* First program *)
b[n_, t_, c_]:= b[n,t,c]= If[n==0, t^2 -c, Sum[j! Binomial[n-1, j-1]b[n-j,t+1,c + If[j==1, 1, 0]], {j,n}]];
a[n_]:= b[n, 0, 0];
a/@ Range[0, 25] (* Jean-François Alcover, Nov 24 2020, after Alois P. Heinz *)
(* Second program *)
Table[If[n<2, 0, n!*(2*LaguerreL[n-2,1,-1] -LaguerreL[n-3,1,-1])], {n,0,30}] (* G. C. Greubel, Mar 09 2021 *)
-
[0,0,4]+[factorial(n)*(2*gen_laguerre(n-2,1,-1) - gen_laguerre(n-3,0,-1)) for n in (3..30)] # G. C. Greubel, Mar 09 2021
A351823
Triangular array read by rows. T(n,k) is the number of sets of lists (as in A000262(n)) with exactly k size 2 lists, n >= 0, 0 <= k <= floor(n/2).
Original entry on oeis.org
1, 1, 1, 2, 7, 6, 49, 12, 12, 301, 140, 60, 2281, 1470, 180, 120, 21211, 12642, 2940, 840, 220417, 127736, 41160, 3360, 1680, 2528569, 1527192, 455112, 70560, 15120, 32014801, 19837530, 5748120, 1234800, 75600, 30240, 442974511, 278142590, 83995560, 16687440, 1940400, 332640
Offset: 0
Triangle T(n,k) begins:
1;
1;
1, 2;
7, 6;
49, 12, 12;
301, 140, 60;
2281, 1470, 180, 120;
21211, 12642, 2940, 840;
...
-
b:= proc(n) option remember; expand(`if`(n=0, 1, add(j!*
`if`(j=2, x, 1)*b(n-j)*binomial(n-1, j-1), j=1..n)))
end:
T:= n-> (p-> seq(coeff(p, x, i), i=0..n/2))(b(n)):
seq(T(n), n=0..12); # Alois P. Heinz, Feb 20 2022
-
nn = 7; Map[Select[#, # > 0 &] &,Range[0, nn]! CoefficientList[Series[Exp[ x/(1 - x) - x ^2 + y x^2], {x, 0, nn}], {x, y}]] // Grid
A351825
Total number of size 2 lists in all sets of lists partitioning [n] (cf. A000262).
Original entry on oeis.org
0, 0, 2, 6, 36, 260, 2190, 21042, 226856, 2709576, 35491770, 505620830, 7780224012, 128555409996, 2269569526406, 42625044254730, 848404205856720, 17836074466842512, 394872870912995826, 9181542826326252726, 223680717959853460340, 5697036951307194432660, 151396442683371572351742
Offset: 0
-
nn = 22; Range[0, nn]! CoefficientList[Series[D[Exp[ x/(1 - x) - x ^2 + y x^2], y] /. y -> 1, {x, 0, nn}], x]
Join[{0, 0, 2}, Table[n!*Hypergeometric1F1[n-1, 2, 1]/E, {n, 3, 25}]] (* Vaclav Kotesovec, Feb 21 2022 *)
A212559
Number of functions f:{1,2,...,n}->{1,2,...,n} such that every non-recurrent element has at most one preimage.
Original entry on oeis.org
1, 1, 4, 27, 244, 2745, 36966, 580111, 10399096, 209672721, 4696872490, 115732052271, 3110867569140, 90587751885241, 2840805169411678, 95450112571474095, 3420897993621996016, 130266500391456691233, 5252293203395848789842, 223535386151669737094095, 10014286301754519472897900
Offset: 0
-
nn=20;a=x Exp[x/(1-x)];Range[0,nn]! CoefficientList[Series[1/(1-a),{x,0,nn}],x]
Showing 1-10 of 10 results.
Comments