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.

A263757 Triangle read by rows: T(n,k) (n>=1, 0<=k

Original entry on oeis.org

1, 1, 1, 1, 2, 3, 1, 4, 7, 12, 1, 7, 17, 35, 60, 1, 12, 44, 93, 210, 360, 1, 20, 103, 275, 651, 1470, 2520, 1, 33, 234, 877, 2047, 5208, 11760, 20160, 1, 54, 533, 2544, 7173, 18423, 46872, 105840, 181440, 1, 88, 1196, 7135, 27085, 67545, 184230, 468720, 1058400, 1814400
Offset: 1

Views

Author

Christian Stump, Oct 25 2015

Keywords

Comments

Row sums give A000142, n >= 1.
Main diagonal gives A001710. - Alois P. Heinz, Sep 20 2016

Examples

			Triangle begins:
  1;
  1,  1;
  1,  2,  3;
  1,  4,  7, 12;
  1,  7, 17, 35,  60;
  1, 12, 44, 93, 210, 360;
  ...
		

Crossrefs

Formula

T(n,k) = A276837(n,k+1) - A276837(n,k). - Alois P. Heinz, Sep 20 2016

Extensions

More terms (rows n=7-10) from Alois P. Heinz, Sep 20 2016

A276974 Number T(n,k) of permutations of [n] where the minimal distance between elements of the same cycle equals k (k=n for the identity permutation in S_n); triangle T(n,k), n>=0, 0<=k<=n, read by rows.

Original entry on oeis.org

1, 0, 1, 0, 1, 1, 0, 4, 1, 1, 0, 19, 3, 1, 1, 0, 103, 12, 3, 1, 1, 0, 651, 54, 10, 3, 1, 1, 0, 4702, 281, 42, 10, 3, 1, 1, 0, 38413, 1652, 203, 37, 10, 3, 1, 1, 0, 350559, 11017, 1086, 166, 37, 10, 3, 1, 1, 0, 3539511, 81665, 6564, 857, 151, 37, 10, 3, 1, 1, 0, 39196758, 669948, 44265, 4900, 726, 151, 37, 10, 3, 1, 1
Offset: 0

Views

Author

Alois P. Heinz, Sep 23 2016

Keywords

Examples

			T(3,1) = 4: (1,2,3), (1,3,2), (1)(2,3), (1,2)(3).
T(3,2) = 1: (1,3)(2).
T(3,3) = 1: (1)(2)(3).
Triangle T(n,k) begins:
  1;
  0,       1;
  0,       1,     1;
  0,       4,     1,    1;
  0,      19,     3,    1,   1;
  0,     103,    12,    3,   1,   1;
  0,     651,    54,   10,   3,   1,  1;
  0,    4702,   281,   42,  10,   3,  1,  1;
  0,   38413,  1652,  203,  37,  10,  3,  1, 1;
  0,  350559, 11017, 1086, 166,  37, 10,  3, 1, 1;
  0, 3539511, 81665, 6564, 857, 151, 37, 10, 3, 1, 1;
  ...
		

Crossrefs

Columns k=0-1 give: A000007, A276975.
Row sums give A000142.
T(2n,n) = A138378(n) = A005493(n-1) for n>0.

A277032 Number of permutations of [n] such that the minimal cyclic distance between elements of the same cycle equals one, a(1)=1 by convention.

Original entry on oeis.org

1, 1, 5, 20, 109, 668, 4801, 38894, 353811, 3561512, 39374609, 474132730, 6179650125, 86676293916, 1301952953989, 20852719565694, 354771488612075, 6389625786835184, 121456993304945749, 2429966790591643402, 51042656559451380013, 1123165278137918510772
Offset: 1

Views

Author

Alois P. Heinz, Sep 25 2016

Keywords

Examples

			a(2) = 1: (1,2).
a(3) = 5: (1,2,3), (1,3,2), (1)(2,3), (1,2)(3), (1,3)(2).
		

Crossrefs

Column k=1 of A277031.

Programs

  • Maple
    b:= proc(n, i, l) option remember; `if`(n=0, mul(j!, j=l),
          (m-> add(`if`(i=j or n*j=1, 0, b(n-1, j, `if`(j>m,
          [l[], 0], subsop(j=l[j]+1, l)))), j=1..m+1))(nops(l)))
        end:
    a:= n-> `if`(n=1, 1, n!-b(n-1, 1, [0])):
    seq(a(n), n=1..15);
  • Mathematica
    b[n_, i_, l_] := b[n, i, l] = If[n == 0, Product[j!, {j, l}], With[{m = Length[l]}, Sum[If[i == j || n*j == 1, 0, b[n-1, j, If[j>m, Append[l, 0], ReplacePart[l, j -> l[[j]]+1]]]], {j, 1, m+1}]]];
    a[n_] := If[n == 1, 1, n! - b[n-1, 1, {0}]];
    Array[a, 15] (* Jean-François Alcover, Mar 13 2021, after Alois P. Heinz *)
Showing 1-3 of 3 results.