login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A071081
Determinant of the n X n matrix whose element (i,j) equals the |i-j|-th composite number, or 0 if i=j.
3
1, 0, -16, 192, -1904, 16416, -134608, 1102920, -8971103, 69262338, -527129920, 4002967800, -30263030000, 218133853800, -1565386817920, 11130108480678, -75244171093875, 496516351214832, -3261752198331472, 21401161780748720, -140093238345715827, 914525302322457472
OFFSET
0,3
LINKS
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
Cf. A374070 (permanent).
Sequence in context: A317008 A365934 A316873 * A317601 A000767 A053539
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