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.

A173103 The number of possible borders of Latin squares with the top row fixed.

This page as a plain text file.
%I A173103 #25 Nov 10 2020 15:44:31
%S A173103 1,1,2,26,924,81624,13433520,3706068240,1582042381920,987057348842880,
%T A173103 861632512758823680,1016677874552767660800,1576819957670934809817600,
%U A173103 3140963381712726319842892800,7880571655922780897709237811200,24492587962448960350527019884595200
%N A173103 The number of possible borders of Latin squares with the top row fixed.
%C A173103 The definition is not quite right, and should be corrected.
%H A173103 Alois P. Heinz, <a href="/A173103/b173103.txt">Table of n, a(n) for n = 1..100</a>
%H A173103 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 A173103 For n>3, a(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 A173103 The only two configurations for n=3, given the top row is 123:
%e A173103   123   123
%e A173103   2 1   3 2
%e A173103   312   231
%e A173103 Two arbitrary configurations for n=4, given the top row is 1234:
%e A173103   1234   1234
%e A173103   2  1   4  3
%e A173103   3  2   3  2
%e A173103   4123   2341
%p A173103 d:= proc(n) d(n):= `if`(n<=1, 1-n, (n-1)*(d(n-1)+d(n-2))) end:
%p A173103 a:= proc(n) a(n):= `if`(n<4, [1, 1, 2][n], (n-2)!*((n-1)/
%p A173103        (n-2)*d(n-1)^2+2*d(n-1)*d(n-2)+(2*n-5)/(n-3)*d(n-2)^2))
%p A173103     end:
%p A173103 seq(a(n), n=1..20);  # _Alois P. Heinz_, Aug 18 2013
%t A173103 d = Subfactorial;
%t A173103 a[n_] := If[n <= 3, {1, 1, 2}[[n]], (n-2)! (((2n-5) d[n-2]^2)/(n-3) + 2d[n-1] d[n-2] + ((n-1) d[n-1]^2)/(n-2))];
%t A173103 Array[a, 20] (* _Jean-François Alcover_, Nov 10 2020 *)
%Y A173103 Related to A000166. Equals A173104 divided by n!.
%K A173103 nonn
%O A173103 1,3
%A A173103 _Johan de Ruiter_, Feb 09 2010