OFFSET
0,3
LINKS
Robert Israel, Table of n, a(n) for n = 0..1000
MAPLE
comps:= remove(isprime, [$4 .. 11000]):
f:= proc(n) local M;
M:= Matrix(n, n, (i, j) -> `if`(i=j, 0, comps[abs(i-j)]));
LinearAlgebra:-Determinant(M)
end proc:
f(0):= 1:
map(f, [$0..25]); # Robert Israel, Dec 02 2024
MATHEMATICA
Composite[n_Integer] := FixedPoint[n + PrimePi[ # ] + 1 &, n + PrimePi[n] + 1]; f[n_] := Det[ Table[ If[i == j, 0, Composite[ Abs[i - j]]], {i, 1, n}, {j, 1, n}]]; Table[ f[n], {n, 1, 20}]
PROG
(Python)
from sympy import Matrix, composite
def A071081(n): return Matrix(n, n, [composite(abs(j-k)) if j!=k else 0 for j in range(n) for k in range(n)]).det() # Chai Wah Wu, Jul 01 2024
(PARI) a(n) = my(composite(n)=my(k=-1); while(-n+n+=-k+k=primepi(n), ); n); matdet(matrix(n, n, i, j, if(i==j, 0, composite(abs(i-j))))); \\ Ruud H.G. van Tol, Jul 14 2024
CROSSREFS
KEYWORD
sign,changed
AUTHOR
Robert G. Wilson v, May 26 2002
EXTENSIONS
a(21) from Stefano Spezia, Jun 27 2024
a(0)=1 prepended by Alois P. Heinz, Jul 01 2024
STATUS
approved