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 A174963 #19 Aug 11 2025 14:58:56 %S A174963 1,3,12,32,-625,-24624,-705894,-19922944,-588305187,-18500000000, %T A174963 -622498190424,-22414085849088,-862029149531797,-35320307409809408, %U A174963 -1537494104003906250,-70904672533321089024,-3454944623172347662151,-177423154932124201844736 %N A174963 Determinant of the symmetric n X n matrix M_n where M_n(j,k) = n for j = k, M_n(j,n) = n-j, M_n(n,k) = n-k, M_n(j,k) = 0 otherwise. %D A174963 J.-M. Monier, Algèbre et géometrie, exercices corrigés. Dunod, 1997, p. 78. %H A174963 Vincenzo Librandi, <a href="/A174963/b174963.txt">Table of n, a(n) for n = 1..100</a> %F A174963 a(n) = n^n - ((n-1)*n*(2*n-1)/6)*n^(n-2). %e A174963 a(5) = det(M_5) = -625 where M_5 is the matrix %e A174963 [5 0 0 0 4] %e A174963 [0 5 0 0 3] %e A174963 [0 0 5 0 2] %e A174963 [0 0 0 5 1] %e A174963 [4 3 2 1 5] %p A174963 with(numtheory):for n from 1 to 25 do:x:=n^n -((n-1)*n*(2*n-1)/6)*n^(n-2):print(x):od: %t A174963 M[j_,k_,n_]:=If[j==k,n,If[k==n,n-j,If[j==n,n-k,0]]]; a[n_]:=Det[Table[M[i,j,n],{i,n},{j,n}]]; Array[a,18] (* _Stefano Spezia_, Aug 11 2025 *) %o A174963 (Magma) [ n^n -((n-1)*n*(2*n-1)/6)*n^(n-2): n in [1..18] ]; // _Klaus Brockhaus_, Apr 11 2010 %o A174963 (Magma) [ Determinant( SymmetricMatrix( &cat[ [ i lt j select 0 else n: i in [1..j] ]: j in [1..n-1] ] cat [ 1+((n-1-k) mod n): k in [1..n] ] ) ): n in [1..18] ]; // _Klaus Brockhaus_, Apr 11 2010 %Y A174963 Cf. A174962. %K A174963 sign %O A174963 1,2 %A A174963 _Michel Lagneau_, Apr 02 2010 %E A174963 Edited by _Klaus Brockhaus_, Apr 11 2010