A052841 Expansion of e.g.f.: 1/(exp(x)*(2-exp(x))).
1, 0, 2, 6, 38, 270, 2342, 23646, 272918, 3543630, 51123782, 811316286, 14045783798, 263429174190, 5320671485222, 115141595488926, 2657827340990678, 65185383514567950, 1692767331628422662, 46400793659664205566, 1338843898122192101558, 40562412499252036940910
Offset: 0
Examples
From _Gus Wiseman_, Feb 13 2019: (Start) The a(4) = 38 ordered set partitions with no cyclical adjacencies: {{1}{2}{3}{4}} {{1}{24}{3}} {{13}{24}} {{1}{2}{4}{3}} {{1}{3}{24}} {{24}{13}} {{1}{3}{2}{4}} {{13}{2}{4}} {{1}{3}{4}{2}} {{13}{4}{2}} {{1}{4}{2}{3}} {{2}{13}{4}} {{1}{4}{3}{2}} {{2}{4}{13}} {{2}{1}{3}{4}} {{24}{1}{3}} {{2}{1}{4}{3}} {{24}{3}{1}} {{2}{3}{1}{4}} {{3}{1}{24}} {{2}{3}{4}{1}} {{3}{24}{1}} {{2}{4}{1}{3}} {{4}{13}{2}} {{2}{4}{3}{1}} {{4}{2}{13}} {{3}{1}{2}{4}} {{3}{1}{4}{2}} {{3}{2}{1}{4}} {{3}{2}{4}{1}} {{3}{4}{1}{2}} {{3}{4}{2}{1}} {{4}{1}{2}{3}} {{4}{1}{3}{2}} {{4}{2}{1}{3}} {{4}{2}{3}{1}} {{4}{3}{1}{2}} {{4}{3}{2}{1}} (End)
Links
- Alois P. Heinz, Table of n, a(n) for n = 0..200
- C. G. Bower, Transforms (2)
- INRIA Algorithms Project, Encyclopedia of Combinatorial Structures 808
- Svante Janson, Euler-Frobenius numbers and rounding, preprint arXiv:1305.3512 [math.PR], 2013.
- Lukas Spiegelhofer, A lower bound for Cusick's conjecture on the digits of n+t, arXiv:1910.13170 [math.NT], 2019.
Crossrefs
Programs
-
Magma
R
:=PowerSeriesRing(Rationals(), 40); Coefficients(R!(Laplace( Exp(-x)/(2-Exp(x)) ))); // G. C. Greubel, Jun 11 2024 -
Maple
spec := [S,{B=Prod(C,C),C=Set(Z,1 <= card),S=Sequence(B)},labeled]: seq(combstruct[count](spec,size=n), n=0..20); P := proc(n,x) option remember; if n = 0 then 1 else (n*x+2*(1-x))*P(n-1,x)+x*(1-x)*diff(P(n-1,x),x); expand(%) fi end: A052841 := n -> subs(x=2, P(n,x)): seq(A052841(n), n=0..21); # Peter Luschny, Mar 07 2014 h := n -> add(combinat:-eulerian1(n, k)*2^k, k=0..n): a := n -> (h(n)+(-1)^n)/2: seq(a(n), n=0..21); # Peter Luschny, Sep 19 2015 b := proc(n, m) option remember; if n = 0 then 1 else (m - 1)*b(n - 1, m) + (m + 1)*b(n - 1, m + 1) fi end: a := n -> b(n, 0): seq(a(n), n = 0..21); # Peter Luschny, Jun 23 2023
-
Mathematica
a[n_] := If[n == 0, 1, (PolyLog[-n, 1/2]/2 + (-1)^n)/2]; (* or *) a[n_] := HurwitzLerchPhi[1/2, -n, -1]/2; Table[a[n], {n, 0, 21}] (* Jean-François Alcover, Feb 19 2016, after Vladeta Jovovic *) With[{nn=30},CoefficientList[Series[1/(Exp[x](2-Exp[x])),{x,0,nn}],x] Range[ 0,nn]!] (* Harvey P. Dale, Apr 08 2019 *)
-
PARI
a(n)=if(n<0,0,n!*polcoeff(subst(1/(1-y^2),y,exp(x+x*O(x^n))-1),n))
-
PARI
{a(n)=polcoeff(sum(m=0,n,(2*m)!*x^(2*m)/prod(k=1,2*m,1-k*x+x*O(x^n))),n)} /* Paul D. Hanna, Jul 20 2011 */
-
SageMath
def A052841_list(prec): P.
= PowerSeriesRing(QQ, prec) return P( exp(-x)/(2-exp(x)) ).egf_to_ogf().list() A052841_list(40) # G. C. Greubel, Jun 11 2024
Formula
O.g.f.: Sum_{n>=0} (2*n)! * x^(2*n) / Product_{k=1..2*n} (1-k*x). - Paul D. Hanna, Jul 20 2011
a(n) = (A000670(n) + (-1)^n)/2 = Sum_{k>=0} (k-1)^n/2^(k+1). - Vladeta Jovovic, Feb 02 2003
Also, a(n) = Sum_{k=0..[n/2]} (2k)!*Stirling2(n, 2k). - Ralf Stephan, May 23 2004
a(n) = D^n*(1/(1-x^2)) evaluated at x = 0, where D is the operator (1+x)*d/dx. Cf. A000670 and A005649. - Peter Bala, Nov 25 2011
E.g.f.: 1/(2*G(0)), where G(k) = 1 - 2^k/(2 - 4*x/(2*x - 2^k*(k+1)/G(k+1) )); (recursively defined continued fraction). - Sergei N. Gladkovskii, Dec 22 2012
a(n) ~ n!/(4*(log(2))^(n+1)). - Vaclav Kotesovec, Aug 10 2013
a(n) = (h(n)+(-1)^n)/2 where h(n) = Sum_{k=0..n} E(n,k)*2^k and E(n,k) the Eulerian numbers A173018 (see also A156365). - Peter Luschny, Sep 19 2015
a(n) = (-1)^n + Sum_{k=0..n-1} binomial(n,k) * a(k). - Ilya Gutkovskiy, Jun 11 2020
Extensions
Edited by N. J. A. Sloane, Sep 06 2013
Comments