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.

A071081 Determinant of the n X n matrix whose element (i,j) equals the |i-j|-th composite number, or 0 if i=j.

Original entry on oeis.org

1, 0, -16, 192, -1904, 16416, -134608, 1102920, -8971103, 69262338, -527129920, 4002967800, -30263030000, 218133853800, -1565386817920, 11130108480678, -75244171093875, 496516351214832, -3261752198331472, 21401161780748720, -140093238345715827, 914525302322457472
Offset: 0

Views

Author

Robert G. Wilson v, May 26 2002

Keywords

Crossrefs

Cf. A374070 (permanent).

Programs

  • 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}]
  • 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
  • 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
    

Extensions

a(21) from Stefano Spezia, Jun 27 2024
a(0)=1 prepended by Alois P. Heinz, Jul 01 2024