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.
%I A079340 #32 Mar 21 2022 08:51:58 %S A079340 1,5,72,1380,31920,861840,26611200,925404480,35805369600, %T A079340 1526139014400,71066912716800,3590219977344000,195589552648089600, %U A079340 11430978821982720000,713448513897799680000,47363888351558338560000 %N A079340 Absolute value of determinant of n X n matrix whose entries are the integers from 1 to n^2 spiraling outward, ending in a corner. %C A079340 If n == 0 or 1 (mod 4), the sign of the determinant will be independent of the orientation of the spiral. For n == 2 or 3 (mod 4), the sign will be reversed when the orientation is rotated by 1/4 or flipped on the horizontal or vertical axis. - _Franklin T. Adams-Watters_, Dec 31 2013 %C A079340 This distribution of the integers is sometimes known as Ulam's spiral, although that is sometimes reserved for when the primes are marked out in some way. - _Franklin T. Adams-Watters_, Dec 31 2013 %H A079340 Gaurav Bhatnagar, Christian Krattenthaler, <a href="https://arxiv.org/abs/1704.02859">Spiral determinants</a>, arXiv:1704.02859 [math.CO], 2017. %F A079340 a(n) = (2*n^2-3*n+3) (2n-2)!/(2 (n-1)!) = A096376(n-1)*A000407(n-2), n>1. - Conjectured by _Dean Hickerson_, Jan 30 2003. Proved in the article by Bhatnagar and Krattenthaler. %F A079340 D-finite with recurrence (2*n^2-7*n+8)*a(n) -2*(2*n-3)*(2*n^2-3*n+3)*a(n-1)=0. - _R. J. Mathar_, May 03 2019 %e A079340 n=2, det=-5: {1 2 / 4 3 }. %e A079340 n=3, det=72: {7 8 9 / 6 1 2 / 5 4 3 }. %e A079340 n=4, det=-1380: { 7 8 9 10 / 6 1 2 11 /5 4 3 12 / 16 15 14 13 }. %e A079340 n=5, det=31920: { 21 22 23 24 25 / 20 7 8 9 10 / 19 6 1 2 11 /18 5 4 3 12 / 17 16 15 14 13 } %t A079340 M[0, 0] = 1; %t A079340 M[i_, j_] := If[i <= j, %t A079340 If[i + j >= 0, If[i != j, M[i + 1, j] + 1, M[i, j - 1] + 1], %t A079340 M[i, j + 1] + 1], %t A079340 If[i + j > 1, M[i, j - 1] + 1, M[i - 1, j] + 1] %t A079340 ] %t A079340 M[n_] := If[EvenQ[n], %t A079340 Table[M[i, j], {j, n/2, -n/2 + 1, -1}, {i, -n/2 + 1, n/2}], %t A079340 Table[M[i, j], {j, (n - 1)/2, -(n - 1)/2, -1}, {i, -(n - 1)/2, (n - 1)/2}]] %t A079340 a[n_]:=Det[M[n]] (* _Christian Krattenthaler_, Apr 19 2017 *) %o A079340 (Maxima) A079340(n):=if n=1 then 1 else (2*n^2-3*n+3)*(2*n-2)!/(2*(n-1)!)$ %o A079340 makelist(A079340(n),n,1,30); /* _Martin Ettl_, Nov 05 2012 */ %Y A079340 Cf. A078475, A023999, A067276, A052182. %K A079340 nonn,easy %O A079340 1,2 %A A079340 Kit Vongmahadlek (kit119(AT)yahoo.com), Jan 03 2003 %E A079340 Extended by _Robert G. Wilson v_, Jan 25 2003