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

A259691 Triangle read by rows: T(n,k) number of arrangements of non-attacking rooks on an n X n right triangular board where the top rook is in row k (n >= 0, 1 <= k <= n+1).

Original entry on oeis.org

1, 1, 1, 2, 2, 1, 5, 6, 3, 1, 15, 20, 12, 4, 1, 52, 74, 51, 20, 5, 1, 203, 302, 231, 104, 30, 6, 1, 877, 1348, 1116, 564, 185, 42, 7, 1, 4140, 6526, 5745, 3196, 1175, 300, 56, 8, 1, 21147, 34014, 31443, 18944, 7700, 2190, 455, 72, 9, 1
Offset: 0

Views

Author

N. J. A. Sloane, Jul 05 2015

Keywords

Comments

Another version of A056857.
See Becker (1948/49) for precise definition.
The case of n=k+1 corresponds to the empty board where there is no top rook. - Andrew Howroyd, Jun 13 2017
T(n-1,k) is the number of partitions of [n] where exactly k blocks contain their own index element. T(3,2) = 6: 134|2, 13|24, 13|2|4, 14|23, 1|234, 1|23|4. - Alois P. Heinz, Jan 07 2022

Examples

			Triangle begins:
    1;
    1,   1;
    2,   2,   1;
    5,   6,   3,   1;
   15,  20,  12,   4,  1;
   52,  74,  51,  20,  5, 1;
  203, 302, 231, 104, 30, 6, 1;
  ...
From _Andrew Howroyd_, Jun 13 2017: (Start)
For n=3 the 5 solutions with the top rook in row 1 are:
  x      x      x      x      x
  . .    . .    . .    . x    . x
  . . .  . . x  . x .  . . .  . . x
For n=3 the 6 solutions with the top rook in row 2 are:
  .      .      .      .      .      .
  x .    x .    x .    . x    . x    . x
  . . .  . x .  . . x  . . .  x . .  . . x
(End)
		

Crossrefs

First column is A000110.
Row sums are A000110(n+1).

Programs

  • Maple
    b:= proc(n, m) option remember; `if`(n=0, 1,
         `if`(n<0, 1/m, m*b(n-1, m)+b(n-1, m+1)))
        end:
    T:= (n, k)-> k*b(n-k, k):
    seq(seq(T(n, k), k=1..n+1), n=0..10);  # Alois P. Heinz, Jan 07 2022
  • Mathematica
    T[n_, k_] := If[k>n, 1, k*Sum[Binomial[n-k, i]*k^i*BellB[n-k-i], {i, 0, n - k}]];
    Table[T[n, k], {n, 0, 10}, {k, 1, n+1}] // Flatten (* Jean-François Alcover, Jul 03 2018, after Andrew Howroyd *)
  • PARI
    bell(n) = sum(k=0, n, stirling(n, k, 2));
    T(n,k) = if(k>n, 1, k*sum(i=0,n-k, binomial(n-k,i) * k^i * bell(n-k-i)));
    for(n=0,6, for(k=1,n+1, print1(T(n,k),", ")); print) \\ Andrew Howroyd, Jun 13 2017

Formula

T(n,n+1) = 1, T(n,k) = k*Sum_{i=0..n-k} binomial(n-k,i) * k^i * Bell(n-k-i) for k<=n. - Andrew Howroyd, Jun 13 2017
From Alois P. Heinz, Jan 07 2022: (Start)
T(n,k) = k * A108087(n-k,k) for 1 <= k <= n.
Sum_{k=1..n+1} k * T(n,k) = A350589(n+1).
Sum_{k=1..n+1} (k+1) * T(n,k) = A347420(n+1). (End)

Extensions

Name edited and terms a(28) and beyond from Andrew Howroyd, Jun 13 2017

A347420 Number of partitions of [n] where the first k elements are marked (0 <= k <= n) and at least k blocks contain their own index.

Original entry on oeis.org

1, 2, 5, 14, 45, 164, 667, 2986, 14551, 76498, 430747, 2582448, 16403029, 109918746, 774289169, 5715471606, 44087879137, 354521950932, 2965359744447, 25749723493074, 231719153184019, 2157494726318234, 20753996174222511, 205985762120971168, 2106795754056142537
Offset: 0

Views

Author

Alois P. Heinz, Jan 05 2022

Keywords

Examples

			a(3) = 14 = 5 + 5 + 3 + 1: 123, 12|3, 13|2, 1|23, 1|2|3, 1'23, 1'2|3, 1'3|2, 1'|23, 1'|2|3, 1'3|2', 1'|2'3, 1'|2'|3, 1'|2'|3'.
		

Crossrefs

Antidiagonal sums of A108087.

Programs

  • Maple
    b:= proc(n, m) option remember;
         `if`(n=0, 1, b(n-1, m+1)+m*b(n-1, m))
        end:
    a:= n-> add(b(i, n-i), i=0..n):
    seq(a(n), n=0..25);
  • Mathematica
    b[n_, m_] := b[n, m] = If[n == 0, 1, b[n - 1, m + 1] + m*b[n - 1, m]];
    a[n_] := Sum[b[i, n - i], {i, 0, n}];
    Table[a[n], {n, 0, 25}] (* Jean-François Alcover, Jan 11 2022, after Alois P. Heinz *)

Formula

a(n) = Sum_{k=0..n} A108087(n-k,k).
a(n) = 1 + A005490(n).
a(n) = A000110(n) + Sum_{k=1..n} k * A259691(n-1,k).
a(n) = Sum_{k=1..n} (k+1) * A259691(n-1,k).
a(n) = A000110(n) + A350589(n).
a(n) mod 2 = A059841(n).

A350648 Sum over all partitions of [n] of the number of blocks containing their own index when blocks are ordered with decreasing largest elements.

Original entry on oeis.org

0, 1, 1, 5, 11, 48, 173, 795, 3719, 19343, 106563, 628508, 3923602, 25875858, 179468739, 1305268102, 9925892324, 78728325373, 649856661196, 5571421770478, 49521735963376, 455616186779543, 4332419124871058, 42520560822961111, 430191406640367880
Offset: 0

Views

Author

Alois P. Heinz, Jan 09 2022

Keywords

Examples

			a(3) = 5 = 3*1 + 2*2: 321, 3|21, 3|2|1; 31|2.
a(4) = 11 = 7*1 + 2*2: 4321, 43|21, 43|2|1, 421|3, 4|321, 4|32|1, 41|3|2; 431|2, 41|32.
		

Crossrefs

Programs

  • Maple
    b:= proc(n, m) option remember; `if`(n=0, [1, 0], add((p->p+
          [0, `if`(j=n, p[1], 0)])(b(n-1, max(j, m))), j=1..m+1))
        end:
    a:= n-> b(n, 0)[2]:
    seq(a(n), n=0..30);
  • Mathematica
    b[n_, m_] := b[n, m] = If[n == 0, {1, 0}, Sum[Function[p, p + {0, If[j == n, p[[1]], 0]}][b[n - 1, Max[j, m]]], {j, 1, m + 1}]];
    a[n_] := b[n, 0][[2]];
    Table[a[n], {n, 0, 30}] (* Jean-François Alcover, Jan 11 2022, after Alois P. Heinz *)

Formula

a(n) = Sum_{k=1..ceiling(n/2)} k * A350647(n,k).
Showing 1-3 of 3 results.