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.

A039917 Number of orderings of 1,2,...,n^2 in an n X n matrix such that each row, each column and both diagonals are increasing.

This page as a plain text file.
%I A039917 #36 Nov 08 2020 05:58:57
%S A039917 1,1,9,2017,21569213,17835527619513,1677123511579177202174,
%T A039917 24742950249259362969953039657613,
%U A039917 75512002909758683196631913316950684079768626,60752021865167494642984305761115275381534124800396484901989,15991585283632910454908797943467512732011897255095362833558749286619895509557
%N A039917 Number of orderings of 1,2,...,n^2 in an n X n matrix such that each row, each column and both diagonals are increasing.
%H A039917 Alois P. Heinz, <a href="/A039917/b039917.txt">Table of n, a(n) for n = 1..14</a>
%H A039917 <a href="/index/Y#Young">Index entries for sequences related to Young tableaux.</a>
%e A039917 From _Alois P. Heinz_, Jul 23 2012: (Start)
%e A039917 a(2) = 1:  [1, 3]
%e A039917            [2, 4].
%e A039917 a(3) = 9:
%e A039917 [1, 4, 7]  [1, 3, 7]  [1, 2, 7]  [1, 4, 6]  [1, 3, 6]
%e A039917 [2, 5, 8]  [2, 5, 8]  [3, 5, 8]  [2, 5, 8]  [2, 5, 8]
%e A039917 [3, 6, 9]  [4, 6, 9]  [4, 6, 9]  [3, 7, 9]  [4, 7, 9]
%e A039917 .
%e A039917 [1, 2, 6]  [1, 4, 6]  [1, 3, 6]  [1, 2, 6]
%e A039917 [3, 5, 8]  [2, 5, 7]  [2, 5, 7]  [3, 5, 7]
%e A039917 [4, 7, 9]  [3, 8, 9]  [4, 8, 9]  [4, 8, 9]. (End)
%p A039917 b:= proc(l) option remember; local n; n:= nops(l); `if`({l[]}={0},
%p A039917       1, add(`if`((l[i]-1<>n-i or i=1 or l[i-1]-1<=n-i) and l[i]>
%p A039917       `if`(i=n, 0, l[i+1]), b(subsop(i=l[i]-1, l)), 0), i=1..n))
%p A039917     end:
%p A039917 a:= n-> b([n$n]):
%p A039917 seq(a(n), n=1..8);  # _Alois P. Heinz_, Jul 23 2012
%t A039917 b[l_List] := b[l] = Module[{n = Length[l]}, If[Union[l] == {0}, 1, Sum[If[ (l[[i]]-1 != n-i || i == 1 || l[[i-1]]-1 <= n-i) && l[[i]] > If[i == n, 0, l[[i+1]]], b[ReplacePart[l, i -> l[[i]]-1]], 0], {i, 1, n}]]];
%t A039917 a[n_] := b[Table[n, {n}]];
%t A039917 Array[a, 8] (* _Jean-François Alcover_, Nov 08 2020, after _Alois P. Heinz_ *)
%Y A039917 Cf. A039622, A181191.
%K A039917 nonn
%O A039917 1,3
%A A039917 _Floor van Lamoen_
%E A039917 One more term from _Jud McCranie_, Aug 09 2001
%E A039917 a(6)-a(13) from _Alois P. Heinz_, Jul 23 2012