OFFSET
0,2
COMMENTS
LINKS
Stefano Spezia, Table of n, a(n) for n = 0..35
Wikipedia, Toeplitz Matrix
EXAMPLE
For n = 1 the matrix M(1) is
2
with permanent a(1) = 2.
For n = 2 the matrix M(2) is
2, 3
5, 2
with permanent a(2) = 19.
For n = 3 the matrix M(3) is
2, 3, 5
7, 2, 3
11, 7, 2
with permanent a(3) = 546.
MAPLE
f:= proc(n) uses LinearAlgebra; `if`(n=0, 1, Permanent(ToeplitzMatrix([seq(ithprime(i), i=2*n-1..n+1, -1), seq(ithprime(i), i=1..n)]))) end proc: map(f, [$0..15]);
MATHEMATICA
p[i_]:=Prime[i]; a[n_]:=If[n==0, 1, Permanent[ToeplitzMatrix[Join[{p[1]}, Array[p, n-1, {n+1, 2*n-1}]], Array[p, n]]]]; Array[a, 15, 0]
PROG
(PARI) tm(n) = {my(m = matrix(n, n, i, j, if (i==1, prime(j), if (j==1, prime(n+i-1))))); for (i=2, n, for (j=2, n, m[i, j] = m[i-1, j-1]; ); ); m; }
a(n) = matpermanent(tm(n)); \\ Michel Marcus, Mar 16 2019
CROSSREFS
KEYWORD
nonn
AUTHOR
Stefano Spezia, Feb 17 2019
EXTENSIONS
a(0) = 1 prepended by Stefano Spezia, Dec 06 2019
STATUS
approved