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.

A324564 Number T(n,k) of permutations p of [n] such that n-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 A324564 #27 May 09 2019 05:04:57
%S A324564 1,1,0,1,1,0,4,1,1,0,15,7,1,1,0,76,31,11,1,1,0,455,185,60,18,1,1,0,
%T A324564 3186,1275,435,113,29,1,1,0,25487,10095,3473,1001,215,47,1,1,0,229384,
%U A324564 90109,31315,9289,2299,406,76,1,1,0,2293839,895169,313227,95747,24610,5320,763,123,1,1,0
%N A324564 Number T(n,k) of permutations p of [n] such that n-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 A324564 Mirror image of A324563.
%H A324564 Alois P. Heinz, <a href="/A324564/b324564.txt">Rows n = 0..23, flattened</a>
%H A324564 Wikipedia, <a href="https://en.wikipedia.org/wiki/Interval_(mathematics)#Integer_intervals">Integer intervals</a>
%H A324564 Wikipedia, <a href="https://en.wikipedia.org/wiki/Iverson_bracket">Iverson bracket</a>
%H A324564 Wikipedia, <a href="https://en.wikipedia.org/wiki/Permanent_(mathematics)">Permanent (mathematics)</a>
%H A324564 Wikipedia, <a href="https://en.wikipedia.org/wiki/Permutation">Permutation</a>
%H A324564 Wikipedia, <a href="https://en.wikipedia.org/wiki/Symmetric_group">Symmetric group</a>
%e A324564 Triangle T(n,k) begins:
%e A324564       1;
%e A324564       1,     0;
%e A324564       1,     1,     0;
%e A324564       4,     1,     1,     0;
%e A324564      15,     7,     1,     1,      0;
%e A324564      76,    31,    11,     1,      1,      0;
%e A324564     455,   185,    60,    18,      1,      1,   0;
%e A324564    3186,  1275,   435,   113,     29,      1,   1,  0;
%e A324564   25487, 10095,  3473,  1001,    215,     47,   1,  1,  0;
%e A324564   ...
%e A324564 Square array A(n,k) begins:
%e A324564       1,     0,     0,     0,      0,      0, ...
%e A324564       1,     1,     1,     1,      1,      1, ...
%e A324564       1,     1,     1,     1,      1,      1, ...
%e A324564       4,     7,    11,    18,     29,     47, ...
%e A324564      15,    31,    60,   113,    215,    406, ...
%e A324564      76,   185,   435,  1001,   2299,   5320, ...
%e A324564     455,  1275,  3473,  9289,  24610,  65209, ...
%e A324564    3186, 10095, 31315, 95747, 290203, 876865, ...
%e A324564    ...
%p A324564 b:= proc(n, k) option remember; `if`(k>n, 0, `if`(k=0, n!,
%p A324564        LinearAlgebra[Permanent](Matrix(n, (i, j)->
%p A324564       `if`(j>=i and k+j<n+i or i>k+j, 1, 0)))))
%p A324564     end:
%p A324564 # as triangle:
%p A324564 T:= (n, k)-> b(n, k)-b(n, k+1):
%p A324564 seq(seq(T(n, k), k=0..n), n=0..10);
%p A324564 # as array:
%p A324564 A:= (n, k)-> b(n+k, k)-b(n+k, k+1):
%p A324564 seq(seq(A(d-k, k), k=0..d), d=0..10);
%t A324564 b[n_, k_] := b[n, k] = If[k > n, 0, If[k == 0, n!, Permanent[Table[If[j >= i && k+j < n+i || i > k+j, 1, 0], {i, n}, {j, n}]]]];
%t A324564 (* as triangle: *)
%t A324564 T[n_, k_] := b[n, k] - b[n, k+1];
%t A324564 Table[T[n, k], {n, 0, 10}, {k, 0, n}] // Flatten
%t A324564 (* as array: *)
%t A324564 A[n_, k_] := b[n+k, k] - b[n+k, k+1];
%t A324564 Table[A[d-k, k], {d, 0, 10}, {k, 0, d}] // Flatten (* _Jean-François Alcover_, May 09 2019, after _Alois P. Heinz_ *)
%Y A324564 Columns k=0-10 give: A002467 (for n>0), A324621, A324622, A324623, A324624, A324625, A324626, A324627, A324628, A324629, A324630.
%Y A324564 Diagonals of the triangle (rows of the array) n=0, (1+2), 3-10 give: A000007, A000012, A000032 (for n>=3), A324631, A324632, A324633, A324634, A324635, A324636, A324637.
%Y A324564 Row sums give A000142.
%Y A324564 T(2n,n) or A(n,n) gives A324638.
%Y A324564 Cf. A002467, A324563.
%K A324564 nonn,tabl
%O A324564 0,7
%A A324564 _Alois P. Heinz_, Mar 06 2019