login

Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.

a(n) is the permanent of the Toeplitz matrix of order n whose element (i,j) equals the (i-j)-th composite number if i > j, (j-i)-th prime number if i < j, or 1 if i = j.
4

%I #11 Jun 30 2024 16:28:30

%S 1,1,9,107,2609,98089,5564610,438180102,46399705928,6279673881161,

%T 1060663766284535,222840745939132105,56798048066468972011,

%U 17364018690978269373950,6261448805827102522607660,2624315396531837995006160020,1263427401352418949898456181999,693487403043958170112254851399169

%N a(n) is the permanent of the Toeplitz matrix of order n whose element (i,j) equals the (i-j)-th composite number if i > j, (j-i)-th prime number if i < j, or 1 if i = j.

%e a(4) = 2609:

%e [1, 2, 3, 5]

%e [4, 1, 2, 3]

%e [6, 4, 1, 2]

%e [8, 6, 4, 1]

%p P,C:= selectremove(isprime,[$2..100]):

%p f:= proc(n) local i; uses LinearAlgebra;

%p Permanent(ToeplitzMatrix([seq(C[i],i=n-1..1,-1),1,seq(P[i],i=1..n-1)]))

%p end proc:

%p map(f, [$0..20]); # _Robert Israel_, Jun 27 2024

%t 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]]

%Y Cf. A071082 (determinant).

%Y Cf. A374067, A374068, A374069, A374070.

%K nonn

%O 0,3

%A _Stefano Spezia_, Jun 27 2024