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.

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 triangle T(n,k), n>=0, 0<=k<=n, read by rows.

This page as a plain text file.
%I A324563 #37 May 08 2019 08:17:11
%S A324563 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,
%T A324563 1,1,29,113,435,1275,3186,0,1,1,47,215,1001,3473,10095,25487,0,1,1,76,
%U A324563 406,2299,9289,31315,90109,229384,0,1,1,123,763,5320,24610,95747,313227,895169,2293839
%N 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<p(i)]]; triangle T(n,k), n>=0, 0<=k<=n, read by rows.
%C A324563 Mirror image of triangle A324564.
%C A324563 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<p(i)]]; square array A(n,k), n>=0, k>=0, read by antidiagonals upwards.
%H A324563 Alois P. Heinz, <a href="/A324563/b324563.txt">Rows n = 0..23, flattened</a>
%H A324563 Wikipedia, <a href="https://en.wikipedia.org/wiki/Interval_(mathematics)#Integer_intervals">Integer intervals</a>
%H A324563 Wikipedia, <a href="https://en.wikipedia.org/wiki/Iverson_bracket">Iverson bracket</a>
%H A324563 Wikipedia, <a href="https://en.wikipedia.org/wiki/Permanent_(mathematics)">Permanent (mathematics)</a>
%H A324563 Wikipedia, <a href="https://en.wikipedia.org/wiki/Permutation">Permutation</a>
%H A324563 Wikipedia, <a href="https://en.wikipedia.org/wiki/Symmetric_group">Symmetric group</a>
%F A324563 T(n,k) = |{ p in S_n : k = max_{i=1..n} (1+i-p(i)+n*[i<p(i)]) }| for n>0, T(0,0) = 1.
%F A324563 T(n,k) = A008305(n,k) - A008305(n,k-1) for k > 0, T(n,0) = A000007(n).
%e A324563 T(4,1) = A(3,1) = 1: 1234.
%e A324563 T(4,2) = A(2,2) = 1: 4123.
%e A324563 T(4,3) = A(1,3) = 7: 1423, 1432, 3124, 3214, 3412, 4132, 4213.
%e A324563 T(4,4) = A(0,4) = 15: 1243, 1324, 1342, 2134, 2143, 2314, 2341, 2413, 2431, 3142, 3241, 3421, 4231, 4312, 4321.
%e A324563 Triangle T(n,k) begins:
%e A324563   1;
%e A324563   0, 1;
%e A324563   0, 1, 1;
%e A324563   0, 1, 1,  4;
%e A324563   0, 1, 1,  7,  15;
%e A324563   0, 1, 1, 11,  31,   76;
%e A324563   0, 1, 1, 18,  60,  185,   455;
%e A324563   0, 1, 1, 29, 113,  435,  1275,   3186;
%e A324563   0, 1, 1, 47, 215, 1001,  3473,  10095, 25487;
%e A324563   ...
%e A324563 Square array A(n,k) begins:
%e A324563   1, 1, 1,  4,  15,   76,   455,   3186, ...
%e A324563   0, 1, 1,  7,  31,  185,  1275,  10095, ...
%e A324563   0, 1, 1, 11,  60,  435,  3473,  31315, ...
%e A324563   0, 1, 1, 18, 113, 1001,  9289,  95747, ...
%e A324563   0, 1, 1, 29, 215, 2299, 24610, 290203, ...
%e A324563   0, 1, 1, 47, 406, 5320, 65209, 876865, ...
%e A324563   ...
%p A324563 b:= proc(n, k) option remember; `if`(n=k, n!,
%p A324563        LinearAlgebra[Permanent](Matrix(n, (i, j)->
%p A324563       `if`(i<=j and j<k+i or n+j<k+i, 1, 0))))
%p A324563     end:
%p A324563 # as triangle:
%p A324563 T:= (n, k)-> b(n, k)-`if`(k=0, 0, b(n, k-1)):
%p A324563 seq(seq(T(n, k), k=0..n), n=0..10);
%p A324563 # as array:
%p A324563 A:= (n, k)-> b(n+k, k)-`if`(k=0, 0, b(n+k, k-1)):
%p A324563 seq(seq(A(d-k, k), k=0..d), d=0..10);
%t A324563 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}]]];
%t A324563 (* as triangle: *)
%t A324563 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
%t A324563 (* as array: *)
%t A324563 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_ *)
%Y A324563 Columns k=0, (1+2), 3-10 give: A000007, A000012, A000032 (for n>=3), A324631, A324632, A324633, A324634, A324635, A324636, A324637.
%Y A324563 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.
%Y A324563 Row sums give A000142.
%Y A324563 T(2n,n) or A(n,n) gives A324638.
%Y A324563 Cf. A008305, A324564.
%K A324563 nonn,tabl
%O A324563 0,10
%A A324563 _Alois P. Heinz_, Mar 06 2019