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.

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.

Original entry on oeis.org

1, 3, 12, 32, -625, -24624, -705894, -19922944, -588305187, -18500000000, -622498190424, -22414085849088, -862029149531797, -35320307409809408, -1537494104003906250, -70904672533321089024, -3454944623172347662151, -177423154932124201844736
Offset: 1

Views

Author

Michel Lagneau, Apr 02 2010

Keywords

Examples

			a(5) = det(M_5) = -625 where M_5 is the matrix
  [5 0 0 0 4]
  [0 5 0 0 3]
  [0 0 5 0 2]
  [0 0 0 5 1]
  [4 3 2 1 5]
		

References

  • J.-M. Monier, Algèbre et géometrie, exercices corrigés. Dunod, 1997, p. 78.

Crossrefs

Cf. A174962.

Programs

  • Magma
    [ n^n -((n-1)*n*(2*n-1)/6)*n^(n-2): n in [1..18] ]; // Klaus Brockhaus, Apr 11 2010
    
  • 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
  • Maple
    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:
  • Mathematica
    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 *)

Formula

a(n) = n^n - ((n-1)*n*(2*n-1)/6)*n^(n-2).

Extensions

Edited by Klaus Brockhaus, Apr 11 2010