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.

A173104 The number of possible borders of Latin squares.

This page as a plain text file.
%I A173104 #22 Nov 10 2020 17:08:43
%S A173104 1,2,12,624,110880,58769280,67704940800,149428671436800,
%T A173104 574091539551129600,3581833707481042944000,34393612685291413069824000,
%U A173104 486990328595374993951457280000,9818890674272030616178239406080000,273823820339488809857168046768783360000
%N A173104 The number of possible borders of Latin squares.
%C A173104 The definition is not quite right, and should be corrected.
%H A173104 Alois P. Heinz, <a href="/A173104/b173104.txt">Table of n, a(n) for n = 1..100</a>
%H A173104 J. de Ruiter, <a href="http://liacs.leidenuniv.nl/assets/Bachelorscripties/10-04-JohandeRuiter.pdf">On Jigsaw Sudoku Puzzles and Related Topics</a>, Bachelor Thesis, Leiden Institute of Advanced Computer Science, 2010.
%F A173104 For n>3, a(n)=n!(n-2)!((n-1)/(n-2)d[n-1]^2+2d[n-1]d[n-2]+(2n-5)/(n-3)d[n-2]^2), where d[k] is the number of derangements of k elements (A000166).
%e A173104 Two arbitrary configurations for n=3:
%e A173104   123   312
%e A173104   2 1   1 3
%e A173104   312   231
%e A173104 Two arbitrary configurations for n=4:
%e A173104   1234   1432
%e A173104   2  1   3  4
%e A173104   3  2   4  1
%e A173104   4123   2143
%p A173104 d:= proc(n) d(n):= `if`(n<=1, 1-n, (n-1)*(d(n-1)+d(n-2))) end:
%p A173104 b:= proc(n) b(n):= `if`(n<4, [1, 1, 2][n], (n-2)!*((n-1)/
%p A173104        (n-2)*d(n-1)^2+2*d(n-1)*d(n-2)+(2*n-5)/(n-3)*d(n-2)^2))
%p A173104     end:
%p A173104 a:= n-> n!*b(n):
%p A173104 seq(a(n), n=1..20);  # _Alois P. Heinz_, Aug 18 2013
%t A173104 d = Subfactorial;
%t A173104 a[n_] := If[n <= 3, {1, 2, 12}[[n]], n! (n-2)! ((n-1)/(n-2) d[n-1]^2 + 2d[n-1] d[n-2] + (2n-5)/(n-3) d[n-2]^2)];
%t A173104 Array[a, 20] (* _Jean-François Alcover_, Nov 10 2020 *)
%Y A173104 Related to A000166. Equals A173103 multiplied by n!.
%K A173104 nonn
%O A173104 1,2
%A A173104 _Johan de Ruiter_, Feb 09 2010