OFFSET
0,3
EXAMPLE
a(4) = 7056:
[0, 4, 6, 8]
[4, 0, 4, 6]
[6, 4, 0, 4]
[8, 6, 4, 0]
MATHEMATICA
Composite[n_Integer]:=FixedPoint[n + PrimePi[#] + 1 &, n + PrimePi[n] + 1]; a[n_]:=Permanent[Table[If[i == j, 0, Composite[Abs[i - j]]], {i, 1, n}, {j, 1, n}]]; Join[{1}, Array[a, 17]]
PROG
(Python)
from sympy import Matrix, composite
def A374070(n): return Matrix(n, n, [composite(abs(j-k)) if j!=k else 0 for j in range(n) for k in range(n)]).per() if n else 1 # Chai Wah Wu, Jul 01 2024
(PARI) a(n) = my(composite(n)=my(k=-1); while(-n+n+=-k+k=primepi(n), ); n); matpermanent(matrix(n, n, i, j, if(i==j, 0, composite(abs(i-j))))); \\ Ruud H.G. van Tol, Jul 14 2024
CROSSREFS
KEYWORD
nonn
AUTHOR
Stefano Spezia, Jun 27 2024
STATUS
approved