OFFSET
0,3
EXAMPLE
a(4) = 8393:
[1, 4, 6, 8]
[4, 1, 4, 6]
[6, 4, 1, 4]
[8, 6, 4, 1]
MATHEMATICA
Composite[n_Integer]:=FixedPoint[n + PrimePi[ # ] + 1 &, n + PrimePi[n] + 1]; a[n_] := Permanent[Table[If[i == j, 1, Composite[Abs[i - j]]], {i, 1, n}, {j, 1, n}]]; Join[{1}, Array[a, 17]]
PROG
(PARI) c(n) = for(k=0, primepi(n), isprime(n++)&&k--); n; \\ A002808
a(n) = matpermanent(matrix(n, n, i, j, if (i==j, 1, c(abs(i-j))))); \\ Michel Marcus, Jun 27 2024
CROSSREFS
KEYWORD
nonn
AUTHOR
Stefano Spezia, Jun 27 2024
STATUS
approved