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.

A052882 A simple grammar: rooted ordered set partitions.

Original entry on oeis.org

0, 1, 2, 9, 52, 375, 3246, 32781, 378344, 4912515, 70872610, 1124723193, 19471590876, 365190378735, 7376016877334, 159620144556645, 3684531055645648, 90366129593683035, 2346673806524446218, 64325158601880061137, 1856031746386568222660, 56231443721132068265415
Offset: 0

Views

Author

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

Keywords

Comments

Recurrence (see Mathematica line) is similar to that for Genocchi numbers A001469. - Wouter Meeussen, Jan 09 2001
Stirling transform of A024167(n) = [ 1, 1, 5, 14, 94, ...] is a(n) = [ 1, 2, 9, 52, 375, ...]. Stirling transform of a(n) = [ 0, 2, 9, 52, 375, ...] is A087301(n+1) = [ 0, 2, 3, 20, ...]. - Michael Somos, Mar 04 2004
Starting with offset 1 = the right border of triangle A208744. - Gary W. Adamson, Mar 05 2012
a(n) is the number of ordered set partitions of {1,2,...,n} such that the first block is a singleton. - Geoffrey Critzer, Jul 22 2013
Ramanujan gives a method of finding a continued fraction of the solution x of an equation 1 = x + a2*x^2 + ... and uses log(2) as the solution of 1 = x + x^2/2 + x^3/6 + ... as an example giving the sequence of simplified convergents as 0/1, 1/1, 2/3, 9/13, 52/75, 375/541, ... of which the sequence of numerators is this sequence while A000670 is the denominators. - Michael Somos, Jun 19 2015

Examples

			G.f. = x + 2*x^2 + 9*x^3 + 52*x^4 + 375*x^5 + 3246*x^6 + 32781*x^7 + ...
		

References

  • S. Ramanujan, Notebooks, Tata Institute of Fundamental Research, Bombay 1957 Vol. 1, see page 19.

Crossrefs

Programs

  • Maple
    spec := [S,{C=Sequence(B),B=Set(Z,1 <= card),S=Prod(Z,C)},labeled]: seq(combstruct[count](spec,size=n), n=0..20);
    with(combinat): a:=n-> add(add(add((-1)^(k-i)*binomial(k, i)*i^(n-1), i=0..n-1), k=0..n-1), m=0..n-1): seq(a(n), n=0..20); # Zerinvary Lajos, Jun 03 2007
    # next Maple program:
    b:= proc(n, k) option remember;
         `if`(n<1, k!, k*b(n-1, k)+b(n-1, k+1))
        end:
    a:= n-> b(n-1, 0)*n:
    seq(a(n), n=0..25);  # Alois P. Heinz, Apr 15 2023
  • Mathematica
    a[1] := 1; a[n_] := a[n]=Sum[ Binomial[n, m] a[ n-m], {m, 1, n-1}]
    Range[0, 30]!* CoefficientList[Series[x/(2 - Exp[x]),{x, 0, 30}], x] (* Vincenzo Librandi, Dec 06 2012 *)
    a[ n_] := If[ n < 2, Boole[n == 1], n PolyLog[ 1 - n, 1/2] / 2]; (* Michael Somos, Jun 19 2015 *)
    a[ n_] := If[ n < 0, 0, n! SeriesCoefficient[ x / (2 - Exp@x), {x, 0, n}]]; (* Michael Somos, Jun 19 2015 *)
    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}]; Fubini[0, 1] = 1; a[n_] := n*Fubini[n-1, 1]; Table[ a[n], {n, 0, 18}] (* Jean-François Alcover, Mar 30 2016 *)
  • PARI
    {a(n) = if( n<0, 0, n! * polcoeff( subst( x / (1 - y), y, exp(x + x*O(x^n)) - 1), n))};
    
  • Python
    from math import factorial
    from sympy.functions.combinatorial.numbers import stirling
    def A052882(n): return n*sum(factorial(k)*stirling(n-1,k) for k in range(n)) # Chai Wah Wu, Apr 15 2023

Formula

E.g.f.: x / (2 - exp(x)).
a(n) = n * A000670(n-1) if n>0.
a(n) = (1/2)*sum(k=0, n-1, B_k*A000629(k)*binomial(n, k)) where B_k is the k-th Bernoulli number. - Benoit Cloitre, Oct 19 2005
a(n) ~ n!/(2*(log(2))^n). - Vaclav Kotesovec, Aug 09 2013
a(0) = 0, a(1) = 1; a(n) = n! * [x^n] exp(x)*Sum_{k=1..n-1} a(k)*x^k/k!. - Ilya Gutkovskiy, Oct 17 2017