cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

Showing 1-3 of 3 results.

A052841 Expansion of e.g.f.: 1/(exp(x)*(2-exp(x))).

Original entry on oeis.org

1, 0, 2, 6, 38, 270, 2342, 23646, 272918, 3543630, 51123782, 811316286, 14045783798, 263429174190, 5320671485222, 115141595488926, 2657827340990678, 65185383514567950, 1692767331628422662, 46400793659664205566, 1338843898122192101558, 40562412499252036940910
Offset: 0

Views

Author

encyclopedia(AT)pommard.inria.fr, Jan 25 2000

Keywords

Comments

From Michael Somos, Mar 04 2004: (Start)
Stirling transform of A005359(n)=[0,2,0,24,0,720,...] is a(n)=[0,2,6,38,270,...].
Stirling transform of -(-1)^n*A052657(n-1)=[0,0,2,-6,48,-240,...] is a(n-1)=[0,0,2,6,38,270,...].
Stirling transform of -(-1)^n*A052558(n-1)=[1,-1,4,-12,72,-360,...] is a(n-1)=[1,0,2,6,38,270,...].
Stirling transform of 2*A052591(n)=[2,4,24,96,...] is a(n+1)=[2,6,38,270,...].
(End)
Also the central moments of a Geometric(1/2) random variable (for example the number of coin tosses until the first head). - Svante Janson, Dec 10 2012
Also the number of ordered set partitions of {1..n} with no cyclical adjacencies (successive elements in the same block, where 1 is a successor of n). - Gus Wiseman, Feb 13 2019
Also the number of ordered set partitions of {1..n} with an even number of blocks. - Geoffrey Critzer, Jul 04 2020

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)
		

Crossrefs

Main diagonal of A122101.
Inverse binomial transform of A000670.

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

A232472 2-Fubini numbers.

Original entry on oeis.org

2, 10, 62, 466, 4142, 42610, 498542, 6541426, 95160302, 1520385010, 26468935022, 498766780786, 10114484622062, 219641848007410, 5085371491003502, 125055112347154546, 3255163896227709422, 89416052656071565810, 2584886208925055791982, 78447137202259689678706, 2493719594804686310662382
Offset: 2

Views

Author

N. J. A. Sloane, Nov 27 2013

Keywords

Examples

			G.f.: 2*x^2 + 10*x^3 + 62*x^4 + 466*x^5 + 4142*x^6 + 42610*x^7 + 498542*x^8 + ...
		

Crossrefs

Programs

  • Magma
    r:=2; r_Fubini:=func;
    [r_Fubini(n, r): n in [r..22]]; // Bruno Berselli, Mar 30 2016
  • Maple
    # r-Stirling numbers of second kind (e.g., A008277, A143494, A143495):
    T := (n,k,r) -> (1/(k-r)!)*add ((-1)^(k+i+r)*binomial(k-r,i)*(i+r)^(n-r),i = 0..k-r):
    # r-Bell numbers (e.g. A000110, A005493, A005494):
    B := (n,r) -> add(T(n,k,r),k=r..n);
    SB := r -> [seq(B(n,r),n=r..30)];
    SB(2);
    # r-Fubini numbers (e.g., A000670, A232472, A232473, A232474):
    F := (n,r) -> add((k)!*T(n,k,r),k=r..n);
    SF := r -> [seq(F(n,r),n=r..30)];
    SF(2);
  • Mathematica
    Rest[max=20; t=Sum[n^(n - 1) x^n / n!, {n, 1, max}]; 2 Range[0, max]!CoefficientList[Series[D[1 / (1 - y (Exp[x] - 1)), y] /.y->1, {x, 0, max}], x]] (* Vincenzo Librandi Jan 03 2016 *)
    Fubini[n_, r_] := Sum[k!*Sum[(-1)^(i+k+r)*(i+r)^(n-r)/(i!*(k-i-r)!), {i, 0, k-r}], {k, r, n}]; Table[Fubini[n, 2], {n, 2, 22}] (* Jean-François Alcover, Mar 30 2016 *)

Formula

Let A(x) be the g.f. A232472, B(x) the g.f. A000670, then A(x) = (1-x)*B(x) - 1. - Sergei N. Gladkovskii, Nov 29 2013
a(n) = Sum_{k>=2} T_k*k^(n-2)/2^k where T_k is the (k-1)-st triangular number (i.e., T_k = k*(k-1)/2). - Derek Orr, Jan 01 2016
a(n) = 2*A069321(n-1). - Vincenzo Librandi, Jan 03 2016, corrected by Vaclav Kotesovec, Jul 01 2018
a(n) ~ n! / (2 * (log(2))^(n+1)). - Vaclav Kotesovec, Jul 01 2018
From Peter Bala, Dec 08 2020: (Start)
a(n+2) = Sum_{k = 0..n} (k+2)!/k!*( Sum{i = 0..k} (-1)^(k-i)*binomial(k,i)*(i+2)^n ).
a(n+2) = Sum_{k = 0..n} 2^(n-k)*binomial(n,k)*( Sum_{i = 0..k} Stirling2(k,i)*(i+2)! ).
a(n) = 2*A069321(n-1) = A000670(n) - A000670(n-1).
a(n+1)= (1/2)*Sum_{k = 0..n} binomial(n,k)*A000670(k+1) for n >= 1.
E.g.f. with offset 0: 2*exp(2*z)/(2 - exp(z))^3 = 2 + 10*z + 62*z^2/2! + 466*z^3/3! + .... (End)

A340837 a(n) = (1/2) * Sum_{k>=0} (k*(k - 1))^n / 2^k.

Original entry on oeis.org

1, 2, 52, 3272, 382672, 71819552, 19755648832, 7489898916992, 3743721038908672, 2385494267756237312, 1887436919680269939712, 1815491288416066631616512, 2086364959404184854563049472, 2823211429546048668686123343872, 4443155724532239407325655263035392
Offset: 0

Views

Author

Ilya Gutkovskiy, Jan 23 2021

Keywords

Crossrefs

Programs

  • Mathematica
    Table[(1/2) Sum[(k (k - 1))^n/2^k, {k, 0, Infinity}], {n, 0, 14}]
    Table[(1/2) Sum[(-1)^k Binomial[n, k] HurwitzLerchPhi[1/2, k - 2 n, 0], {k, 0, n}], {n, 0, 14}]

Formula

a(n) = Sum_{k=0..n} (-1)^k * binomial(n,k) * A000670(2*n-k).
a(n) = 2 * A080163(n) for n > 0. - Hugo Pfoertner, Jan 23 2021
a(n) = A122101(2*n,n). - Alois P. Heinz, Jun 23 2023
Showing 1-3 of 3 results.