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.

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