A111723
Number of partitions of an n-set with an odd number of blocks of size 1.
Original entry on oeis.org
1, 0, 4, 4, 31, 86, 449, 1968, 10420, 56582, 333235, 2069772, 13606113, 94065232, 682242552, 5175100432, 40954340995, 337362555010, 2886922399649, 25616738519384, 235313456176512, 2234350827008170, 21899832049913999, 221292603495494488, 2302631998398438321
Offset: 1
-
b:= proc(n, t) option remember; `if`(n=0, t, add(b(n-j,
`if`(j=1, 1-t, t))*binomial(n-1, j-1), j=1..n))
end:
a:= n-> b(n, 0):
seq(a(n), n=1..30); # Alois P. Heinz, May 10 2016
-
Rest[ Range[0, 23]! CoefficientList[ Series[ Sinh[x]Exp[Exp[x] - 1 - x], {x, 0, 23}], x]] (* Robert G. Wilson v *)
-
from sympy.core.cache import cacheit
from sympy import binomial
@cacheit
def b(n, t):
return t if n==0 else sum(b(n - j, (1 - t if j==1 else t))*binomial(n - 1, j - 1) for j in range(1, n + 1))
def a(n):
return b(n, 0)
print([a(n) for n in range(1, 51)]) # Indranil Ghosh, Aug 10 2017
A111724
Number of partitions of an n-set with an even number of blocks of size 1.
Original entry on oeis.org
0, 2, 1, 11, 21, 117, 428, 2172, 10727, 59393, 345335, 2143825, 14038324, 96834090, 700715993, 5305041715, 41910528809, 344714251149, 2945819805408, 26107419715988, 239556359980239, 2272364911439153, 22252173805170347, 224666265799310801, 2335958333831561032
Offset: 1
-
b:= proc(n, t) option remember; `if`(n=0, t, add(b(n-j,
`if`(j=1, 1-t, t))*binomial(n-1, j-1), j=1..n))
end:
a:= n-> b(n, 1):
seq(a(n), n=1..30); # Alois P. Heinz, May 10 2016
-
Rest[ Range[0, 24]! CoefficientList[ Series[ Cosh[x]Exp[Exp[x] - 1 - x], {x, 0, 23}], x]] (* Robert G. Wilson v *)
-
from sympy.core.cache import cacheit
from sympy import binomial
@cacheit
def b(n, t): return t if n==0 else sum(b(n - j, (1 - t if j==1 else t))*binomial(n - 1, j - 1) for j in range(1, n + 1))
def a(n): return b(n, 1)
print([a(n) for n in range(1, 51)]) # Indranil Ghosh, Aug 10 2017
A063083
Number of permutations of n elements with an odd number of fixed points.
Original entry on oeis.org
0, 1, 0, 4, 8, 56, 304, 2192, 17408, 156928, 1568768, 17257472, 207087616, 2692143104, 37689995264, 565349945344, 9045599092736, 153775184642048, 2767953323425792, 52591113145352192, 1051822262906519552, 22088267521037959168, 485941885462833004544
Offset: 0
Ahmed Fares (ahmedfares(AT)my-deja.com), Aug 05 2001
-
nn = 20; d = Exp[-x]/(1 - x); Range[0, nn]! CoefficientList[Series[Sinh[x] d, {x, 0, nn}], x] (* Geoffrey Critzer, Jan 14 2012 *)
a[n_] := -n!/2 Sum[(-2)^i/i!, {i, 1, n}]
Table[a[n], {n, 0, 20}] (* Gerry Martens , May 06 2016 *)
-
{ for (n=0, 100, if (n, a=n*a + (-2)^(n-1), a=0); write("b063083.txt", n, " ", a) ) } \\ Harry J. Smith, Aug 17 2009
A111752
Number of partitions of {1,..,n} into lists with an even number of lists of size 1, where a list means an ordered subset (cf. A000262).
Original entry on oeis.org
1, 0, 3, 6, 49, 300, 2491, 22890, 239457, 2782584, 35595091, 496577070, 7499663953, 121855323876, 2118793593099, 39245026343250, 771255810671041, 16025261292247920, 350956070419872547, 8078570913162379734, 194969375055353840241, 4922311437793379501340
Offset: 0
-
b:= proc(n, t) option remember; `if`(n=0, t, add(b(n-j,
`if`(j=1, 1-t, t))*binomial(n-1, j-1)*j!, j=1..n))
end:
a:= n-> b(n, 1):
seq(a(n), n=0..30); # Alois P. Heinz, May 10 2016
-
b[n_, t_] := b[n, t] = If[n == 0, t, Sum[b[n-j, If[j == 1, 1-t, t]] * Binomial[n-1, j-1]*j!, {j, 1, n}]]; a[n_] := b[n, 1]; Table[a[n], {n, 0, 30}] (* Jean-François Alcover, Jan 21 2017, after Alois P. Heinz *)
-
from sympy.core.cache import cacheit
from sympy import binomial, factorial as f
@cacheit
def b(n, t): return t if n==0 else sum(b(n - j, (1 - t if j==1 else t))*binomial(n - 1, j - 1)*f(j) for j in range(1, n + 1))
def a(n): return b(n, 1)
print([a(n) for n in range(51)]) # Indranil Ghosh, Aug 10 2017
A111753
Number of partitions of {1,..,n} into lists with an odd number of lists of size 1, where a list means an ordered subset, cf. A000262.
Original entry on oeis.org
0, 1, 0, 7, 24, 201, 1560, 14743, 154896, 1813969, 23346000, 327496071, 4970498280, 81121077337, 1416223931304, 26328776843671, 519178407998880, 10821355158998433, 237677397895531296, 5485802780426178439, 132728552830731814200, 3358841601972480225001
Offset: 0
-
b:= proc(n, t) option remember; `if`(n=0, t, add(b(n-j,
`if`(j=1, 1-t, t))*binomial(n-1, j-1)*j!, j=1..n))
end:
a:= n-> b(n, 0):
seq(a(n), n=0..30); # Alois P. Heinz, May 10 2016
-
b[n_, t_] := b[n, t] = If[n==0, t, Sum[b[n-j, If[j==1, 1-t, t]]*Binomial[ n-1, j-1]*j!, {j, 1, n}]]; a[n_] := b[n, 0]; Table[a[n], {n, 0, 30}] (* Jean-François Alcover, Feb 03 2017, after Alois P. Heinz *)
-
from sympy.core.cache import cacheit
from sympy import binomial, factorial as f
@cacheit
def b(n, t): return t if n==0 else sum([b(n - j, (1 - t if j==1 else t))*binomial(n - 1, j - 1)*f(j) for j in range(1, n + 1)])
def a(n): return b(n, 0)
print([a(n) for n in range(51)]) # Indranil Ghosh, Aug 10 2017
A088336
Number of permutations in the symmetric group S_n that have even number of transpositions in their cycle decomposition.
Original entry on oeis.org
1, 1, 1, 3, 18, 90, 480, 3360, 27720, 249480, 2479680, 27276480, 327650400, 4259455200, 59623724160, 894355862400, 14309953257600, 243269205379200, 4378836875212800, 83197900629043200, 1663958347802150400, 34943125303845158400, 768748742605299456000
Offset: 0
Yuval Dekel (dekelyuval(AT)hotmail.com), Nov 07 2003
-
mx = 21; Rest[ Range[0, mx]! CoefficientList[ Series[(Exp[-x^2] + 1)/(1 - x)/2, {x, 0, mx}], x]] (* Robert G. Wilson v, May 04 2013 *)
-
x='x+O('x^50); Vec(serlaplace((exp(-x^2)+1)/(1-x)/2)) \\ G. C. Greubel, Aug 20 2017
Showing 1-6 of 6 results.
Comments