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-6 of 6 results.

A007820 Stirling numbers of second kind S(2n,n).

Original entry on oeis.org

1, 1, 7, 90, 1701, 42525, 1323652, 49329280, 2141764053, 106175395755, 5917584964655, 366282500870286, 24930204590758260, 1850568574253550060, 148782988064375309400, 12879868072770626040000, 1194461517469807833782085, 118144018577011378596484455
Offset: 0

Views

Author

kemp(AT)sads.informatik.uni-frankfurt.de (Rainer Kemp)

Keywords

Comments

Chan and Manna prove that a(n) is odd if and only if n is in A003714. - Jason Kimberley, Sep 14 2009
The number of ways to partition a set of 2*n elements into n disjoint subsets. - Vladimir Reshetnikov, Oct 10 2016
Conjecture: a(2*n+1) is divisible by (2*n + 1)^2. - Peter Bala, Mar 30 2025

Examples

			G.f.: A(x) = 1 + x + 7*x^2 + 90*x^3 + 1701*x^4 + 42525*x^5 +...,
where A(x) = 1 + 1^2*x*exp(-1*x) + 2^4*exp(-2^2*x)*x^2/2! + 3^6*exp(-3^2*x)*x^3/3! + 4^8*exp(-4^2*x)*x^4/4! + 5^10*exp(-5^2*x)*x^5/5! + ... - _Paul D. Hanna_, Oct 17 2012
		

References

  • M. Abramowitz and I. A. Stegun, eds., Handbook of Mathematical Functions, National Bureau of Standards Applied Math. Series 55, 1964 (and various reprintings), p. 835.

Crossrefs

Programs

  • Maple
    A007820 := proc(n) Stirling2(2*n,n) ; end proc:
    seq(A007820(n),n=0..20) ; # R. J. Mathar, Mar 15 2011
  • Mathematica
    Table[StirlingS2[2n, n], {n, 1, 12}] (* Emanuele Munarini, Mar 12 2011 *)
  • Maxima
    makelist(stirling2(2*n,n),n,0,12); /* Emanuele Munarini, Mar 12 2011 */
    
  • PARI
    a(n)=stirling(2*n,n,2); /* Joerg Arndt, Jul 01 2011 */
    
  • PARI
    {a(n)=polcoeff(1/prod(k=1, n, 1-k*x +x*O(x^(2*n))), n)} \\ Paul D. Hanna, Oct 17 2012
    
  • PARI
    {a(n)=polcoeff(sum(m=1,n,(m^2)^m*exp(-m^2*x+x*O(x^n))*x^m/m!),n)} \\ Paul D. Hanna, Oct 17 2012
    
  • Python
    from sympy.functions.combinatorial.numbers import stirling
    def A007820(n): return stirling(n<<1,n) # Chai Wah Wu, Jun 09 2025
  • Sage
    [stirling_number2(2*i,i) for i in range(1,20)] # Zerinvary Lajos, Jun 26 2008
    

Formula

a(n) = A048993(2n,n). - R. J. Mathar, Mar 15 2011
Asymptotic: a(n) ~ (4*n/(e*z*(2-z)))^n/sqrt(2*Pi*n*(z-1)), where z = A256500 = 1.59362426... is a root of the equation exp(z)*(2-z)=2. - Vaclav Kotesovec, May 30 2011
a(n) = 1/n! * Sum_{k = 0..n} binomial(n,k)*(-1)^k*(n-k)^(2*n). - Emanuele Munarini, Jul 01 2011
a(n) = [x^n] 1 / Product_{k=1..n} (1-k*x). - Paul D. Hanna, Oct 17 2012
O.g.f.: Sum_{n>=1} (n^2)^n * exp(-n^2*x) * x^n/n! = Sum_{n>=1} S2(2*n,n)*x^n. - Paul D. Hanna, Oct 17 2012
G.f.: Sum_{n > 0} (a(n)*n!/(2*n)!)*x^n = x*B'(x)/B(x)-1, where B(x) satisfies B(x)^2 = x*(exp(B(x))-1). - Vladimir Kruchinin, Mar 13 2013
a(n) = Sum_{j = 0..n} (-1)^(n-j)*n^j*binomial(2*n,j)*stirling2(2*n-j,n). - Vladimir Kruchinin, Jun 14 2013

Extensions

Typo in Mathematica program fixed by Vincenzo Librandi, May 04 2013
a(0)=1 prepended by Alois P. Heinz, Feb 01 2018

A217905 O.g.f.: Sum_{n>=0} -n^n*(n-1)^(n-1) * exp(-n*(n-1)*x) * x^n / n!.

Original entry on oeis.org

1, -1, -2, -14, -184, -3532, -89256, -2800016, -104967808, -4578528464, -227816059360, -12735645181536, -790296855912576, -53905019035510528, -4008716449677965312, -322807879692969879552, -27983800239966141382656, -2598368754552749176202496, -257284990746988090769530368
Offset: 0

Views

Author

Paul D. Hanna, Oct 14 2012

Keywords

Comments

Compare the g.f. to the LambertW identity:
1 = Sum_{n>=0} -(n-1)^(n-1) * exp(-(n-1)*x) * x^n/n!.

Examples

			O.g.f.: A(x) = 1 - x - 2*x^2 - 14*x^3 - 184*x^4 - 3532*x^5 - 89256*x^6 +...
where
A(x) = 1 - 1^1*0^0*x*exp(-1*0*x) - 2^2*1^1*exp(-2*1*x)*x^2/2! - 3^3*2^2*exp(-3*2*x)*x^3/3! - 4^4*3^3*exp(-4*3*x)*x^4/4! - 5^5*4^4*exp(-5*4*x)*x^5/5! +...
simplifies to a power series in x with integer coefficients.
		

Crossrefs

Programs

  • Mathematica
    Join[{1, -1}, Table[(1/n!)*Sum[(-1)^(n - k + 1)*Binomial[n, k]*k^n*(k - 1)^(n - 1), {k, 0, n}], {n, 2, 50}]] (* G. C. Greubel, Nov 16 2017 *)
  • PARI
    {a(n)=polcoeff(sum(m=0,n,-m^m*(m-1)^(m-1)*x^m*exp(-m*(m-1)*x+x*O(x^n))/m!),n)}
    
  • PARI
    {a(n)=(1/n!)*polcoeff(sum(k=0, n, -k^k*(k-1)^(k-1)*x^k/(1+k*(k-1)*x +x*O(x^n))^(k+1)), n)}
    
  • PARI
    {a(n)=1/n!*sum(k=0,n, -(-1)^(n-k)*binomial(n,k)*k^n*(k-1)^(n-1))}
    
  • PARI
    {a(n)=polcoeff(1-x*(1-x)^(n-1)/prod(k=0, n, 1-k*x +x*O(x^n)), n)}
    
  • PARI
    {a(n)=polcoeff(1-x*(1+x)^n/prod(k=0, n, 1-(k-1)*x +x*O(x^n)), n)}
    for(n=0,30,print1(a(n),", "))

Formula

a(n) = -A191236(n-1) for n>=1. [corrected by Vaclav Kotesovec, Aug 22 2018]
a(n) = 1/n! * Sum_{k=0..n} -(-1)^(n-k)*binomial(n,k) * k^n * (k-1)^(n-1) for n>=0.
a(n) = 1/n! * [x^n] Sum_{k>=0} -k^k*(k-1)^(k-1)*x^k / (1 + k*(k-1)*x)^(k+1).
a(n) = [x^n] 1 - x*(1-x)^(n-1) / Product_{k=1..n} (1-k*x).
a(n) = [x^n] 1 - x*(1+x)^(n-1) / Product_{k=1..n} (1-(k-1)*x).
a(n) ~ -2^(n-1) * exp(n*(r-1)-r) * n^(n - 3/2) / (sqrt(Pi*(r-1)*(2-r)) * r^(n-1)), where r = 2 + LambertW(-2*exp(-2)) = A256500 = 1.5936242600400400923230418... - Vaclav Kotesovec, Aug 22 2018

A256500 Decimal expansion of the positive solution to x = 2*(1-exp(-x)).

Original entry on oeis.org

1, 5, 9, 3, 6, 2, 4, 2, 6, 0, 0, 4, 0, 0, 4, 0, 0, 9, 2, 3, 2, 3, 0, 4, 1, 8, 7, 5, 8, 7, 5, 1, 6, 0, 2, 4, 1, 7, 8, 9, 0, 0, 2, 4, 2, 4, 8, 1, 8, 8, 5, 9, 3, 6, 4, 9, 9, 9, 5, 0, 4, 5, 1, 1, 6, 9, 6, 0, 8, 4, 9, 8, 4, 8, 1, 6, 1, 8, 7, 9, 5, 0, 2, 3, 2, 7, 4, 9, 9, 2, 7, 6, 6, 1, 8, 4, 4, 0, 7, 1, 4, 1, 7, 0, 6
Offset: 1

Views

Author

Stanislav Sykora, Mar 31 2015

Keywords

Comments

Each of the positive solutions to x = q*(1-exp(-x)) obtained for q = 2, 3, 4, and 5, appears in several formulas pertinent to Planck's black-body radiation law. For a given q, the solution can be also written as q+W(-q/exp(q)), where W is the Lambert function. Here q = 2.
The constant appears in asymptotic formula for A007820. - Vladimir Reshetnikov, Oct 10 2016

Examples

			1.5936242600400400923230418758751602417890024248188593649995...
		

Crossrefs

Cf. A194567 (q=3), A256501 (q=4), A256502 (q=5).

Programs

  • Mathematica
    RealDigits[2 + LambertW[-2 Exp[-2]], 10, 100][[1]] (* Vladimir Reshetnikov, Oct 10 2016 *)
  • PARI
    a2=solve(x=0.1,10,x-2*(1-exp(-x))) \\ Use real precision in excess

Formula

Equals 2*(1-A106533). - Miko Labalan, Dec 18 2024
Equals log(A229553). - Hugo Pfoertner, Dec 19 2024

A199033 Number of ways to place n non-attacking bishops on a 2 X 2n board.

Original entry on oeis.org

1, 4, 22, 128, 771, 4744, 29618, 186880, 1188679, 7608764, 48953224, 316283264, 2050706932, 13336273528, 86953633242, 568221290496, 3720529001823, 24403423540348, 160314652983158, 1054635453261568, 6946703172803003, 45809043607167328, 302395650703501688
Offset: 0

Views

Author

Vaclav Kotesovec, Nov 02 2011

Keywords

Crossrefs

Programs

  • Magma
    [(&+[Binomial(2*n-j+1,j)*Binomial(n+j+1,n-j): j in [0..n]]): n in [0..30]]; // G. C. Greubel, Feb 19 2019
    
  • Mathematica
    Table[Sum[Binomial[2n-j+1,j]*Binomial[n+j+1,n-j],{j,0,n}],{n,0,25}]
  • Maxima
    A199033(n):=sum(binomial(n+k+1, n-k)*binomial(2*n-k+1,k),k,0,n)$ makelist(A199033(n),n,0,22); /* Martin Ettl, Nov 15 2012 */
    
  • PARI
    {a(n)=sum(k=0, n, binomial(n+k+1, n-k)*binomial(2*n-k+1, k))}
    
  • PARI
    {a(n)=local(G=1); for(i=0, n, G=1+x*G^3+O(x^(n+1))); polcoeff(G^2/(1-2*x*G^2-3*x^2*G^4), n)} \\ Paul D. Hanna, Nov 14 2012
    for(n=0,25,print1(a(n),", "))
    
  • Sage
    [sum(binomial(2*n-j+1,j)*binomial(n+j+1,n-j) for j in (0..n)) for n in (0..30)] # G. C. Greubel, Feb 19 2019

Formula

Recurrence: (112*n^4 + 968*n^3 + 3048*n^2 + 4136*n + 2040)*a(n+2) = (728*n^4 + 5914*n^3 + 17550*n^2 + 22510*n + 10530)*a(n+1) + (189*n^4 + 1539*n^3 + 4578*n^2 + 5886*n + 2760)*a(n). - Vaclav Kotesovec, Oct 30 2011
a(n) = Sum_{j=0..n} (binomial(2n-j+1,j)*binomial(n+j+1,n-j)).
a(n) ~ 3^(3n+4)/2^(2n+5)/sqrt(3*Pi*n).
Self-convolution of A219197. - Paul D. Hanna, Nov 14 2012
G.f.: A(x) = G(x)^2 / (1 - 2*x*G(x)^2 - 3*x^2*G(x)^4), where G(x) = 1 + x*G(x)^3 = g.f. of A001764. - Paul D. Hanna, Nov 14 2012
a(n) = [x^n] 1/((1 - x^2)*(1 - x)^(2*n+2)). - Ilya Gutkovskiy, Oct 25 2017

Extensions

Offset changed to 0 and a(0)=1 added by Paul D. Hanna, Nov 14 2012

A352241 Maximal number of nonattacking black-square queens on an n X n chessboard.

Original entry on oeis.org

1, 1, 1, 2, 3, 4, 5, 5, 6, 7, 8, 9, 9, 10, 11, 12, 13, 13, 14, 15, 16, 17, 17, 18, 19, 20, 21, 21, 22, 23, 24, 25, 25, 26, 27, 28, 29, 29, 30, 31, 32, 33, 33, 34, 35, 36, 37, 37, 38, 39, 40, 40, 41, 42, 43, 44, 44, 45, 46, 47
Offset: 1

Views

Author

George Baloglou, Mar 09 2022

Keywords

Crossrefs

Cf. this sequence (maximal number for black-squares), A352325 (black-squares counts), A352426 (maximal number for white-squares), A352599 (white-squares counts).

Formula

Conjecture: a(5k)=4k-1, a(5k+1)=4k, a(5k+2)=4k+1, a(5k+3)=4k+1, a(5k+4)=4k+2. [This does not hold for n = 52 and n = 57. - Andy Huchala, Apr 02 2024]
a(n) = A053757(n-1), at least for 1 <= n <= 12. [This is unlikely to continue. - N. J. A. Sloane, Mar 11 2022] [Indeed the equality does not hold for n=13. - Martin Ehrenstein, Mar 11 2022]
a(n+1) >= a(n); a(2n) = A352426(2n). - Martin Ehrenstein, Mar 23 2022

Extensions

a(13)-a(26) from Martin Ehrenstein, Mar 11 2022
a(27)-a(28) from Martin Ehrenstein, Mar 15 2022
a(29)-a(30) from Martin Ehrenstein, Mar 23 2022
a(31)-a(60) from Andy Huchala, Mar 27 2024

A274106 Triangle read by rows: T(n,k) = total number of configurations of k nonattacking bishops on the white squares of an n X n chessboard (0 <= k <= n-1+[n=0]).

Original entry on oeis.org

1, 1, 1, 2, 1, 4, 2, 1, 8, 14, 4, 1, 12, 38, 32, 4, 1, 18, 98, 184, 100, 8, 1, 24, 188, 576, 652, 208, 8, 1, 32, 356, 1704, 3532, 2816, 632, 16, 1, 40, 580, 3840, 12052, 16944, 9080, 1280, 16, 1, 50, 940, 8480, 38932, 89256, 93800, 37600, 3856, 32, 1, 60, 1390, 16000, 98292, 322848, 540080, 412800, 116656, 7744, 32
Offset: 0

Views

Author

N. J. A. Sloane, Jun 14 2016

Keywords

Comments

From Eder G. Santos, Dec 16 2024: (Start)
The sequence counts every possible nonattacking configuration of k bishops on the white squares of an n X n chess board.
It is assumed that the n X n chess board has a black square in the upper left corner.
(End)

Examples

			Triangle begins:
  1;
  1;
  1,  2;
  1,  4,    2;
  1,  8,   14,     4;
  1, 12,   38,    32,     4;
  1, 18,   98,   184,   100,      8;
  1, 24,  188,   576,   652,    208,      8;
  1, 32,  356,  1704,  3532,   2816,    632,     16;
  1, 40,  580,  3840, 12052,  16944,   9080,   1280,     16;
  1, 50,  940,  8480, 38932,  89256,  93800,  37600,   3856,   32;
  1, 60, 1390, 16000, 98292, 322848, 540080, 412800, 116656, 7744, 32;
  ...
From _Eder G. Santos_, Dec 16 2024: (Start)
For example, for n = 3, k = 2, the T(3,2) = 2 nonattacking configurations are:
  +---+---+---+   +---+---+---+
  |   | B |   |   |   |   |   |
  +---+---+---+   +---+---+---+
  |   |   |   | , | B |   | B |
  +---+---+---+   +---+---+---+
  |   | B |   |   |   |   |   |
  +---+---+---+   +---+---+---+
(End)
		

Crossrefs

Columns k=0-1 give: A000012, A007590.
Alternate rows give A088960.
Row sums are A216078(n+1).
T(2n,n) gives A191236.
T(2n+1,n) gives A217900(n+1).
T(n+1,n) gives A060546.
Cf. A274105 (black squares), A288182, A201862, A002465.

Programs

  • Maple
    with(combinat): with(gfun):
    T := n -> add(stirling2(n+1,n+1-k)*x^k, k=0..n):
    # bishops on white squares
    bish := proc(n) local m,k,i,j,t1,t2; global T;
        if n=0 then return [1] fi;
        if (n mod 2) = 0 then m:=n/2;
            t1:=add(binomial(m,k)*T(2*m-1-k)*x^k, k=0..m);
        else
            m:=(n-1)/2;
            t1:=add(binomial(m,k)*T(2*m-k)*x^k, k=0..m+1);
        fi;
        seriestolist(series(t1,x,2*n+1));
    end:
    for n from 0 to 12 do lprint(bish(n)); od:
  • Mathematica
    T[n_] := Sum[StirlingS2[n+1, n+1-k]*x^k, {k, 0, n}];
    bish[n_] := Module[{m, t1, t2}, If[Mod[n, 2] == 0,
       m = n/2;     t1 = Sum[Binomial[m, k]*T[2*m-1-k]*x^k, {k, 0, m}],
       m = (n-1)/2; t1 = Sum[Binomial[m, k]*T[2*m - k]*x^k, {k, 0, m+1}]];
    CoefficientList[t1 + O[x]^(2*n+1), x]];
    Table[bish[n], {n, 1, 12}] // Flatten (* Jean-François Alcover, Jul 25 2022, after Maple code *)
  • SageMath
    def stirling2_negativek(n, k):
      if k < 0: return 0
      else: return stirling_number2(n, k)
    print([sum([binomial(floor(n/2), j)*stirling2_negativek(n-j, n-k) for j in [0..k]]) for n in [0..10] for k in [0..n-1+kronecker_delta(n,0)]]) # Eder G. Santos, Dec 01 2024

Formula

From Eder G. Santos, Dec 01 2024: (Start)
T(n,k) = Sum_{j=0..k} binomial(floor(n/2),j) * Stirling2(n-j,n-k).
T(n,k) = T(n-1,k) + (n-k+1-A000035(n)) * T(n-1,k-1), T(n,0) = 1, T(0,k) = delta(k,0). (End)

Extensions

T(0,0) prepended by Eder G. Santos, Dec 01 2024
Showing 1-6 of 6 results.