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-10 of 12 results. Next

A324563 Number T(n,k) of permutations p of [n] such that k is the maximum of 0 and the number of elements in any integer interval [p(i)..i+n*[i=0, 0<=k<=n, read by rows.

Original entry on oeis.org

1, 0, 1, 0, 1, 1, 0, 1, 1, 4, 0, 1, 1, 7, 15, 0, 1, 1, 11, 31, 76, 0, 1, 1, 18, 60, 185, 455, 0, 1, 1, 29, 113, 435, 1275, 3186, 0, 1, 1, 47, 215, 1001, 3473, 10095, 25487, 0, 1, 1, 76, 406, 2299, 9289, 31315, 90109, 229384, 0, 1, 1, 123, 763, 5320, 24610, 95747, 313227, 895169, 2293839
Offset: 0

Views

Author

Alois P. Heinz, Mar 06 2019

Keywords

Comments

Mirror image of triangle A324564.
Or as array: Number A(n,k) of permutations p of [n+k] such that k is the maximum of 0 and the number of elements in any integer interval [p(i)..i+(n+k)*[i=0, k>=0, read by antidiagonals upwards.

Examples

			T(4,1) = A(3,1) = 1: 1234.
T(4,2) = A(2,2) = 1: 4123.
T(4,3) = A(1,3) = 7: 1423, 1432, 3124, 3214, 3412, 4132, 4213.
T(4,4) = A(0,4) = 15: 1243, 1324, 1342, 2134, 2143, 2314, 2341, 2413, 2431, 3142, 3241, 3421, 4231, 4312, 4321.
Triangle T(n,k) begins:
  1;
  0, 1;
  0, 1, 1;
  0, 1, 1,  4;
  0, 1, 1,  7,  15;
  0, 1, 1, 11,  31,   76;
  0, 1, 1, 18,  60,  185,   455;
  0, 1, 1, 29, 113,  435,  1275,   3186;
  0, 1, 1, 47, 215, 1001,  3473,  10095, 25487;
  ...
Square array A(n,k) begins:
  1, 1, 1,  4,  15,   76,   455,   3186, ...
  0, 1, 1,  7,  31,  185,  1275,  10095, ...
  0, 1, 1, 11,  60,  435,  3473,  31315, ...
  0, 1, 1, 18, 113, 1001,  9289,  95747, ...
  0, 1, 1, 29, 215, 2299, 24610, 290203, ...
  0, 1, 1, 47, 406, 5320, 65209, 876865, ...
  ...
		

Crossrefs

Columns k=0, (1+2), 3-10 give: A000007, A000012, A000032 (for n>=3), A324631, A324632, A324633, A324634, A324635, A324636, A324637.
Diagonals of the triangle (rows of the array) n=0-10 give: A002467 (for k>0), A324621, A324622, A324623, A324624, A324625, A324626, A324627, A324628, A324629, A324630.
Row sums give A000142.
T(2n,n) or A(n,n) gives A324638.

Programs

  • Maple
    b:= proc(n, k) option remember; `if`(n=k, n!,
           LinearAlgebra[Permanent](Matrix(n, (i, j)->
          `if`(i<=j and j b(n, k)-`if`(k=0, 0, b(n, k-1)):
    seq(seq(T(n, k), k=0..n), n=0..10);
    # as array:
    A:= (n, k)-> b(n+k, k)-`if`(k=0, 0, b(n+k, k-1)):
    seq(seq(A(d-k, k), k=0..d), d=0..10);
  • Mathematica
    b[n_, k_] := b[n, k] = If[n == k, n!, Permanent[Table[If[i <= j && j < k + i || n + j < k + i, 1, 0], {i, 1, n}, {j, 1, n}]]];
    (* as triangle: *)
    T[n_, k_] := b[n, k] - If[k == 0, 0, b[n, k - 1]]; Table[T[n, k], {n, 0, 10}, {k, 0, n}] // Flatten
    (* as array: *)
    A[n_, k_] := b[n + k, k] - If[k == 0, 0, b[n + k, k - 1]]; Table[A[d - k, k], {d, 0, 10}, {k, 0, d}] // Flatten (* Jean-François Alcover, May 08 2019, after Alois P. Heinz *)

Formula

T(n,k) = |{ p in S_n : k = max_{i=1..n} (1+i-p(i)+n*[i0, T(0,0) = 1.
T(n,k) = A008305(n,k) - A008305(n,k-1) for k > 0, T(n,0) = A000007(n).

A324621 Number of permutations p of [1+n] such that n is the maximum of the number of elements in any integer interval [p(i)..i+(1+n)*[i

Original entry on oeis.org

0, 1, 1, 7, 31, 185, 1275, 10095, 90109, 895169, 9793829, 116998199, 1515196619, 21143666585, 316260079951, 5047672782687, 85623656678457, 1538245254809537, 29176112648650441, 582614412521648359, 12217688610474042487, 268445509189890555577
Offset: 0

Views

Author

Alois P. Heinz, Mar 09 2019

Keywords

Crossrefs

Row n=1 of A324563 and column of A324564 (as array).

Programs

  • Maple
    a:= proc(n) option remember; `if`(n<5, [0, 1$2, 7, 31][n+1],
          ((2*n^4-3*n^3-2*n^2+n+4)*a(n-1) -(n^5-4*n^4+7*n^2+6*n-14)*
           a(n-2) -(n^5-2*n^4-4*n^3+2*n^2+13*n-12)*a(n-3)-(n-2)*
           (n^3+2*n^2+n-2)*a(n-4))/(n^3-n^2-2))
        end:
    seq(a(n), n=0..23);
  • Mathematica
    menage[n_] := If[n == 0, 1, 2n Sum[(-1)^k Binomial[2n-k, k] (n-k)!/(2n-k), {k, 0, n}]];
    a[n_] := If[n == 0, 0, Subfactorial[n+1] - menage[n+1]];
    a /@ Range[0, 21] (* Jean-François Alcover, Oct 28 2021 *)

Formula

a(n) = A000166(n+1) - A000179(n+1) for n < 0, a(0) = 0.

A324622 Number of permutations p of [2+n] such that n is the maximum of the number of elements in any integer interval [p(i)..i+(2+n)*[i

Original entry on oeis.org

0, 1, 1, 11, 60, 435, 3473, 31315, 313227, 3445641, 41341502, 537313583, 7520316423, 112771887719, 1803821926465, 30656189582521, 551659191788556, 10478765887885181, 209522984620760153, 4398943767896801309, 96755196700729056267, 2224901906327124750355
Offset: 0

Views

Author

Alois P. Heinz, Mar 09 2019

Keywords

Crossrefs

Row n=2 of A324563 and column of A324564 (as array).

Formula

a(n) = A000179(n+2) - A000183(n+2).

A324623 Number of permutations p of [3+n] such that n is the maximum of the number of elements in any integer interval [p(i)..i+(3+n)*[i

Original entry on oeis.org

0, 1, 1, 18, 113, 1001, 9289, 95747, 1075779, 13129188, 173006731, 2449243815, 37082963875, 598045522873, 10236223969309, 185344819109346, 3539853769700281, 71122126197951465, 1499666213536206971, 33113352117542113491, 764116379880803291501
Offset: 0

Views

Author

Alois P. Heinz, Mar 09 2019

Keywords

Crossrefs

Row n=3 of A324563 and column of A324564 (as array).

Formula

a(n) = A000183(n+3) - A004307(n+3).

A324624 Number of permutations p of [4+n] such that n is the maximum of the number of elements in any integer interval [p(i)..i+(4+n)*[i

Original entry on oeis.org

0, 1, 1, 29, 215, 2299, 24610, 290203, 3664639, 49665695, 719356045, 11100719773, 181925519591, 3157018912485, 57848571473665, 1116400995778789, 22637359008083824, 481232567245746693, 10703530470036896333, 248615220921060645505, 6020095122314424497575
Offset: 0

Views

Author

Alois P. Heinz, Mar 09 2019

Keywords

Crossrefs

Row n=4 of A324563 and column of A324564 (as array).

Formula

a(n) = A004307(n+4) - A189389(n+4).

A324625 Number of permutations p of [5+n] such that n is the maximum of the number of elements in any integer interval [p(i)..i+(5+n)*[i

Original entry on oeis.org

0, 1, 1, 47, 406, 5320, 65209, 876865, 12428079, 187013213, 2977639454, 50100075551, 889030153223, 16605705694513, 325842147818131, 6704025812865230, 144359437306938642, 3247712172059705741, 76210676599647821811, 1862449116865631232577
Offset: 0

Views

Author

Alois P. Heinz, Mar 09 2019

Keywords

Crossrefs

Row n=5 of A324563 column of A324564 (as array).

Formula

a(n) = A189389(n+5) - A184965(n+5).

A324626 Number of permutations p of [6+n] such that n is the maximum of the number of elements in any integer interval [p(i)..i+(6+n)*[i

Original entry on oeis.org

0, 1, 1, 76, 763, 12277, 173111, 2653275, 42093128, 702648806, 12292640257, 225478889531, 4332332279039, 87108358452379, 1830631685045257, 40159929532511862, 918479788074790715, 21870877993310401595
Offset: 0

Views

Author

Alois P. Heinz, Mar 09 2019

Keywords

Crossrefs

Row n=6 of A324563 and column of A324564 (as array).

A324627 Number of permutations p of [7+n] such that n is the maximum of the number of elements in any integer interval [p(i)..i+(7+n)*[i

Original entry on oeis.org

0, 1, 1, 123, 1431, 28337, 457965, 8041166, 142688017, 2639058561, 50689730519, 1013206417391, 21074302033903, 456084254291809, 10265228833915967, 240124807728408475, 5833187694753202363
Offset: 0

Views

Author

Alois P. Heinz, Mar 09 2019

Keywords

Crossrefs

Row n=7 of A324563 and column of A324564 (as array).

A324628 Number of permutations p of [8+n] such that n is the maximum of the number of elements in any integer interval [p(i)..i+(8+n)*[i

Original entry on oeis.org

0, 1, 1, 199, 2676, 65469, 1209129, 24330731, 483906047, 9919457739, 209006411538, 4550241332823, 102418431583071, 2385231119694273, 57488444625865101, 1433825413465384003, 36995367724604395132
Offset: 0

Views

Author

Alois P. Heinz, Mar 09 2019

Keywords

Crossrefs

Row n=8 of A324563 and column of A324564 (as array).

A324629 Number of permutations p of [9+n] such that n is the maximum of the number of elements in any integer interval [p(i)..i+(9+n)*[i

Original entry on oeis.org

0, 1, 1, 322, 4993, 151401, 3188384, 73575295, 1638376021, 37296199680, 862203161593, 20436051653561, 497587696258955, 12467167386012869, 321709005522260383, 8554048660846031618
Offset: 0

Views

Author

Alois P. Heinz, Mar 09 2019

Keywords

Crossrefs

Row n=9 of A324563 and column of A324564 (as array).
Showing 1-10 of 12 results. Next