A374069
a(n) is the permanent of the symmetric Toeplitz matrix of order n whose element (i,j) equals the |i-j|-th composite or 1 if i = j.
Original entry on oeis.org
1, 1, 17, 261, 8393, 356618, 20355656, 1498310848, 141920467648, 16632516446720, 2345863766165536, 394823892589979472, 78653652638945445776, 18216229760067802231488, 4833321599094565894295552, 1462259517864407783009737728, 498935238969900279377677930496, 190227655207141695023381769820864
Offset: 0
a(4) = 8393:
[1, 4, 6, 8]
[4, 1, 4, 6]
[6, 4, 1, 4]
[8, 6, 4, 1]
-
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]]
-
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
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
-
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
-
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}]
-
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
-
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
Showing 1-2 of 2 results.