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

A002465 Number of ways to place n nonattacking bishops on an n X n board.

Original entry on oeis.org

1, 1, 4, 26, 260, 3368, 53744, 1022320, 22522960, 565532992, 15915225216, 496911749920, 17029582652416, 636101065346560, 25705530908501760, 1118038500044633088, 52054862490790200576, 2584158975023147147264
Offset: 0

Views

Author

Keywords

Comments

The old name of this sequence was wrong. It was corrected by Vaclav Kotesovec, Feb 19 2011. Kotesovec remarks that the maximal number of nonattacking bishops on an n X n board is 2n-2, and there are 2^n ways to place them. See the Kotesovec link.

Examples

			a(3) = 26: ways to place 3 nonattacking bishops on a 3 X 3 board:
  XXX XXO XXO XOX OXO
  OOO OOO OOO OOO OXO
  OOO XOO OXO OXO OXO
  (4) (8) (8) (4) (2)
		

References

  • W. Ahrens, Mathematische Unterhaltungen und Spiele. Teubner, Leipzig, Vol. 1, 3rd ed., 1921; Vol. 2, 2nd ed., 1918. See Vol. 1, p. 271.
  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
  • N. Vilenkin, Populyarnaja kombinatorika, 1972, p. 166.

Crossrefs

Main diagonal of A378590.

Programs

  • Mathematica
    peven[i_]:=(Sum[(-1)^j*Binomial[n-i-1,j]/(n-i-1)!*(n-i+1-j)^(n/2)*(n-i-j)^(n/2-1),{j,0,n-i-1}]);
    poddblack[i_]:=(Sum[(-1)^j*Binomial[n-i-1,j]/(n-i-1)!*(n-i+1-j)^((n+1)/2)*(n-i-j)^((n-3)/2),{j,0,n-i-1}]);
    poddwhite[i_]:=(Sum[(-1)^j*Binomial[n-i-1,j]/(n-i-1)!*(n-i+1-j)^((n-1)/2)*(n-i-j)^((n-1)/2),{j,0,n-i-1}]);
    Table[If[n==1,1,Sum[If[EvenQ[n],peven[i]*peven[n-i],poddblack[i]*poddwhite[n-i]],{i,1,n-1}]],{n,1,50}]
    (* Alternative formula with Stirling numbers of the second kind: *)
    Table[If[n==1,1, Sum[Sum[Binomial[Floor[(n+1)/2],j] * StirlingS2[j+Floor[n/2],n-i], {j,0,Floor[(n+1)/2]}] * Sum[Binomial[Floor[n/2],j] * StirlingS2[j+Floor[(n+1)/2],i], {j,0,Floor[n/2]}], {i,1,n-1}]], {n,1,50}] (* Vaclav Kotesovec, Mar 23 2011 *)

Formula

Asymptotic: a(n)/(n-1)! ~ 0.631266 * 3.08827^n. - Vaclav Kotesovec, Mar 23 2011
The second constant is 2/(z*(2-z)) = 3.0882773047417401791158400820254..., where z is the root z=1.593624260040... of the equation exp(z)*(2-z)=2. - Vaclav Kotesovec, May 27 2011
For constants see A238258 and A238260. - Vaclav Kotesovec, Feb 21 2014

Extensions

More terms from Herman Jamke (hermanjamke(AT)fastmail.fm), Nov 20 2006
Definition corrected by Vaclav Kotesovec, Feb 19 2011
Terms a(11)-a(17) from Vaclav Kotesovec, Mar 09 2011
a(0)=1 prepended by Alois P. Heinz, Dec 01 2024

A342110 a(n) = Sum_{k=0..n} Stirling2(n,k) * Stirling2(n,n-k).

Original entry on oeis.org

1, 0, 1, 6, 61, 770, 12160, 228382, 4989621, 124262532, 3475892685, 107901412520, 3681266754660, 136918473752216, 5513911474915116, 239034083286873630, 11098790133822288645, 549539910028075555016, 28903562131933534643851, 1609321474965547356327246
Offset: 0

Views

Author

Vaclav Kotesovec, Feb 28 2021

Keywords

Crossrefs

Programs

  • Magma
    [(&+[StirlingSecond(n, k)*StirlingSecond(n, n-k): k in [0..n]]): n in [0..30]]; // G. C. Greubel, Jun 03 2021
    
  • Mathematica
    Table[Sum[StirlingS2[n, k]*StirlingS2[n, n-k], {k, 0, n}], {n, 0, 20}]
  • PARI
    a(n) = sum(k=0, n, stirling(n, k, 2)*stirling(n, n-k, 2)); \\ Michel Marcus, Feb 28 2021
    
  • Sage
    [sum( stirling_number2(n, k)*stirling_number2(n, n-k) for k in (0..n) ) for n in (0..30)] # G. C. Greubel, Jun 03 2021

Formula

From Vaclav Kotesovec, Feb 28 2021, updated May 25 2025: (Start)
a(n) ~ c * d^n * (n-1)!, where
d = A238258 = -2 / (LambertW(-2*exp(-2)) * (2 + LambertW(-2*exp(-2)))) = 3.0882773047417401791158400820254382768364448971420138767247...
c = 1/(2*Pi*sqrt((1 + LambertW(-2*exp(-2)))*(3 + LambertW(-2*exp(-2))))) = 0.12826577250734152801558828593238744179869387423941684693208180123477... (End)

A363435 Number of partitions of [2n] having exactly n blocks with all elements of the same parity.

Original entry on oeis.org

1, 0, 5, 42, 569, 9470, 191804, 4534502, 122544881, 3721101192, 125331498349, 4634063018948, 186515332107196, 8114659545679752, 379362605925991692, 18961051425453713478, 1008752282616284996865, 56905048753221935350268, 3392250956149146382053539
Offset: 0

Views

Author

Alois P. Heinz, Jun 01 2023

Keywords

Examples

			a(2) = 5: 13|24, 14|2|3, 1|2|34, 1|23|4, 12|3|4.
		

Crossrefs

Programs

  • Maple
    g:= proc(n) option remember; `if`(n=0, 1, expand(x*
          add(g(n-j)*binomial(n-1, j-1), j=1..n)))
        end:
    S:= (n, k)-> coeff(g(n), x, k):
    b:= proc(g, u) option remember;
          add(S(g, k)*S(u, k)*k!, k=0..min(g, u))
        end:
    T:= proc(n, k) option remember; local g, u; g:= floor(n/2); u:= ceil(n/2);
          add(add(add(binomial(g, i)*S(i, h)*binomial(u, j)*
          S(j, k-h)*b(g-i, u-j), j=k-h..u), i=h..g), h=0..k)
        end:
    a:= n-> T(2*n, n):
    seq(a(n), n=0..18);
  • Mathematica
    b[g_, u_] := b[g, u] = Sum[StirlingS2[g, k]*StirlingS2[u, k]*k!, {k, 0, Min[g, u]}];
    T[n_, k_] := Module[{g, u}, g = Floor[n/2]; u = Ceiling[n/2]; Sum[Sum[Sum[ Binomial[g, i]*StirlingS2[i, h]*Binomial[u, j]*StirlingS2[j, k - h]*b[g - i, u - j], {j, k - h, u}], {i, h, g}], {h, 0, k}]];
    a[n_] := T[2n, n];
    Table[a[n], {n, 0, 18}] (* Jean-François Alcover, Oct 20 2023, after Alois P. Heinz in A124424 *)

Formula

a(n) = A124424(2n,n).
Conjecture: Limit_{n->oo} (a(n)/n!)^(1/n) = A238258 = -2 / (LambertW(-2*exp(-2)) * (2 + LambertW(-2*exp(-2)))) = 3.0882773... - Vaclav Kotesovec, Oct 21 2023

A238260 Decimal expansion of a multiplicative constant related to A002465.

Original entry on oeis.org

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

Views

Author

Vaclav Kotesovec, Feb 21 2014

Keywords

Examples

			0.63126687887411546797...
		

Crossrefs

Formula

Equals lim n->infinity A002465(n) / ((n-1)! * A238258^n).
Showing 1-4 of 4 results.