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

A094577 Central Peirce numbers. Number of set partitions of {1,2,..,2n+1} in which n+1 is the smallest of its block.

Original entry on oeis.org

1, 3, 27, 409, 9089, 272947, 10515147, 501178937, 28773452321, 1949230218691, 153281759047387, 13806215066685433, 1408621900803060705, 161278353358629226675, 20555596673435403499083, 2896227959507289559616217, 448371253145121338801335489
Offset: 0

Views

Author

Vladeta Jovovic, May 12 2004

Keywords

Comments

Let P(n,k) be the number of set partitions of {1,2,..,n} in which k is the smallest of its block. These numbers were introduced by C. S. Peirce (see reference, page 48). If this triangle is displayed as in A123346 (or A011971) then a(n) = A011971(2n, n) are the central Pierce numbers. - Peter Luschny, Jan 18 2011
Named after the American philosopher, logician, mathematician and scientist Charles Sanders Peirce (1839-1914). - Amiram Eldar, Jun 11 2021

Examples

			n = 1, S = {1, 2, 3}. k = n+1 = 2. Thus a(1) = card { 13|2, 1|23, 1|2|3 } = 3. - _Peter Luschny_, Jan 18 2011
		

References

  • Donald E. Knuth, The Art of Computer Programming, Vol. 4, Section 7.2.1.5.

Crossrefs

Main diagonal of array in A011971.

Programs

  • Maple
    seq(add(binomial(n, k)*(bell(n+k)), k=0..n), n=0..14); # Zerinvary Lajos, Dec 01 2006
    # The objective of this implementation is efficiency.
    # m -> [a(0), a(1), ..., a(m-1)] for m > 0.
    A094577_list := proc(m)
       local A, R, M, n, k, j;
       M := m+m-1; A := array(1..M);
       j := 1; R := 1; A[1] := 1;
       for n from 2 to M do
          A[n] := A[1];
          for k from n by -1 to 2 do
             A[k-1] := A[k-1] + A[k]
          od;
          if is(n,odd) then
             j := j+1; R := R,A[j] fi
       od;
    [R] end:
    A094577_list(100); # example call - Peter Luschny, Jan 17 2011
  • Mathematica
    f[n_] := Sum[Binomial[n, k]*BellB[2 n - k], {k, 0, n}]; Array[f, 15, 0]
  • Python
    # requires python 3.2 or higher. Otherwise use def'n of accumulate in python docs.
    from itertools import accumulate
    A094577_list, blist, b = [1], [1], 1
    for n in range(2,502):
        blist = list(accumulate([b]+blist))
        b = blist[-1]
        blist = list(accumulate([b]+blist))
        b = blist[-1]
        A094577_list.append(blist[-n])
    # Chai Wah Wu, Sep 02 2014, updated Chai Wah Wu, Sep 20 2014

Formula

a(n) = Sum_{k=0..n} binomial(n,k)*Bell(2*n-k).
a(n) = Sum_{k=0..n} (-1)^k*binomial(n, k)*Bell(2*n-k+1).
a(n) = exp(-1)*Sum_{k>=0} (k(k+1))^n/k!. - Benoit Cloitre, Dec 30 2005
a(n) = Sum_{k=0..n} binomial(n,k)*Bell(n+k). - Vaclav Kotesovec, Jul 29 2022

A201862 Number of ways to place k nonattacking bishops on an n X n board, sum over all k>=0.

Original entry on oeis.org

1, 2, 9, 70, 729, 9918, 167281, 3423362, 82609921, 2319730026, 74500064809, 2711723081550, 110568316431609, 5016846683306758, 251180326892449969, 13806795579059621930, 827911558468860287041, 53940895144894708523922, 3799498445458163685753481, 288400498147873552894868886
Offset: 0

Views

Author

Vaclav Kotesovec, Dec 06 2011

Keywords

Comments

Also the number of vertex covers and independent vertex sets of the n X n bishop graph.

Crossrefs

Programs

  • Mathematica
    knbishops[k_,n_]:=(If[n==1,If[k==1,1,0],(-1)^k/(2n-k)!
    *Sum[Binomial[2n-k,n-k+i]*Sum[(-1)^m*Binomial[n-i,m]*m^Floor[n/2]*(m+1)^Floor[(n+1)/2],{m,1,n-i}]
    *Sum[(-1)^m*Binomial[n-k+i,m]*m^Floor[(n+1)/2]*(m+1)^Floor[n/2],{m,1,n+i-k}],{i,Max[0,k-n],Min[k,n]}]]);
    Table[1+Sum[knbishops[k,n],{k,1,2n-1}],{n,1,25}]

Formula

a(n) = A216078(n+1) * A216332(n+1). - Andrew Howroyd, May 08 2017

Extensions

a(0)=1 prepended by Alois P. Heinz, Dec 01 2024

A216332 Number of horizontal and antidiagonal neighbor colorings of the even squares of an n X 2 array with new integer colors introduced in row major order.

Original entry on oeis.org

1, 2, 3, 10, 27, 114, 409, 2066, 9089, 52922, 272947, 1788850, 10515147, 76282138, 501178937, 3974779402, 28773452321, 247083681522, 1949230218691, 17984917069018, 153281759047387, 1510073008031682, 13806215066685433
Offset: 1

Views

Author

R. H. Hardin, Sep 04 2012

Keywords

Comments

Number of vertex covers and independent vertex sets of the n-1 X n-1 black bishops graph. Equivalently, the number of ways to place any number of non-attacking bishops on the black squares of an n-1 X n-1 board. - Andrew Howroyd, May 08 2017

Examples

			Some solutions for n=5:
..0..x....0..x....0..x....0..x....0..x....0..x....0..x....0..x....0..x....0..x
..x..1....x..1....x..1....x..0....x..1....x..1....x..0....x..1....x..1....x..0
..0..x....2..x....2..x....1..x....2..x....2..x....1..x....2..x....0..x....1..x
..x..2....x..0....x..1....x..2....x..1....x..0....x..1....x..0....x..1....x..2
..3..x....3..x....3..x....0..x....2..x....1..x....0..x....2..x....0..x....3..x
There are 5 black squares on a 3 X 3 board. There is 1 way to place no non-attacking bishops, 5 ways to place 1 and 4 ways to place 2 so a(4)=1+5+4=10. - _Andrew Howroyd_, Jun 06 2017
		

Crossrefs

Column 2 of A216338.
Row sums of A274105(n-1) for n>2.

Programs

  • Mathematica
    Table[Sum[Binomial[Ceiling[n/2], k] BellB[n - k], {k, 0, Ceiling[n/2]}], {n, 0, 20}] (* Eric W. Weisstein, Jun 25 2017 *)

A286422 Number of matchings in the n X n black bishop graph.

Original entry on oeis.org

2, 12, 130, 9492, 1166928, 1431128744, 2907639077764, 76670800431934272, 3341096345926174809912, 2311650738313947870105792416, 2645105778378736719464340469683304, 56641723029988800376624313271476598959936
Offset: 2

Views

Author

Andrew Howroyd, May 08 2017

Keywords

Comments

Matchings are not necessarily perfect matchings.
C# software that can be used to compute this sequence can be found in A270228.

Crossrefs

Cf. A286423, A287248, A270228, A216078 (independent vertex sets), A234603 (cycles).

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