OFFSET
0,3
EXAMPLE
a(4) = 2609:
[1, 2, 3, 5]
[4, 1, 2, 3]
[6, 4, 1, 2]
[8, 6, 4, 1]
MAPLE
P, C:= selectremove(isprime, [$2..100]):
f:= proc(n) local i; uses LinearAlgebra;
Permanent(ToeplitzMatrix([seq(C[i], i=n-1..1, -1), 1, seq(P[i], i=1..n-1)]))
end proc:
map(f, [$0..20]); # Robert Israel, Jun 27 2024
MATHEMATICA
Composite[n_Integer] := FixedPoint[n + PrimePi[ # ] + 1 &, n + PrimePi[n] + 1]; a[n_]:= Permanent[Table[If[i == j, 1, If[i > j, Composite[i - j], Prime[j - i]]], {i, 1, n}, {j, 1, n}]]; Join[{1}, Array[a, 17]]
CROSSREFS
KEYWORD
nonn
AUTHOR
Stefano Spezia, Jun 27 2024
STATUS
approved