login
A394257
Determinant of the n X n matrix M(i,j) = f(gcd(i,j)) + delta(i,j), where f is the characteristic function of numbers coprime to 6 (A354354) and delta(i,j) is the Kronecker delta.
0
1, 2, 1, 0, -1, -1, 1, 2, 4, 16, 23, 33, 61, 78, 101, 166, 203, 247, 349, 410, 484, 666, 767, 881, 1129, 1274, 1441, 1828, 2039, 2271, 2761, 3042, 3356, 4060, 4439, 4849, 5701, 6182, 6709, 7866, 8483, 9143, 10501, 11258, 12076, 13846, 14783, 15777, 17809, 18930, 20129, 22696, 24047
OFFSET
0,2
COMMENTS
The function f(k) is 1 if gcd(k,6) = 1, and 0 otherwise (the characteristic function of 5-rough numbers, see A354354). Without the identity matrix perturbation delta(i,j), the determinant of this GCD matrix is 0 for n >= 4 due to the linear dependence of rows/columns. The sequence is a quasipolynomial of degree 4 with period 6.
LINKS
Henry J. Stephen Smith, On the value of a certain arithmetical determinant, Proc. London Math. Soc. (1875-1876) Vol. 7, 208-212.
Index entries for linear recurrences with constant coefficients, signature (1,0,1,-1,0,3,-3,0,-3,3,0,-3,3,0,3,-3,0,1,-1,0,-1,1).
FORMULA
a(n) = (n^4 + 6*n^3 - 90*n^2 + 108*n + 324) / 324 if n == 0 (mod 6).
a(n) = (n^4 + 5*n^3 - 93*n^2 + 59*n + 676) / 324 if n == 1 (mod 6).
a(n) = (n^4 + 4*n^3 - 93*n^2 + 76*n + 496) / 324 if n == 2 (mod 6).
a(n) = (n^4 + 6*n^3 - 81*n^2 + 54*n + 324) / 324 if n == 3 (mod 6).
a(n) = (n^4 + 5*n^3 - 84*n^2 + 68*n + 172) / 324 if n == 4 (mod 6).
a(n) = (n^4 + 4*n^3 - 84*n^2 + 40*n + 451) / 324 if n == 5 (mod 6).
(All formulas are for n >= 6).
G.f.: -(x^21 -2*x^20 -x^19 -3*x^18 -4*x^16 +x^15 +4*x^14 +7*x^13 +10*x^12 +5*x^11 +12*x^10 +16*x^9 +5*x^8 -x^7 +x^5 -2*x^4 -2*x^3 -x^2 +x +1) / ((x+1)^3 *(x^2-x+1)^3 *(x^2+x+1)^4 *(x-1)^5).
EXAMPLE
For n = 4, the matrix M is [[2, 1, 1, 1], [1, 1, 1, 0], [1, 1, 1, 1], [1, 0, 1, 1]], and its determinant a(4) = -1.
MAPLE
f := proc(n) if igcd(n, 6) = 1 then 1 else 0 fi end proc:
a := proc(n) local M, i, j;
M := Matrix(n, n, (i, j) -> f(igcd(i, j)) + `if`(i = j, 1, 0));
LinearAlgebra:-Determinant(M);
end proc:
seq(a(n), n = 0 .. 52);
MATHEMATICA
f[k_] := If[GCD[k, 6] == 1, 1, 0];
a[n_] := Det[Table[f[GCD[i, j]] + If[i == j, 1, 0], {i, 1, n}, {j, 1, n}]];
Table[a[n], {n, 1, 52}]
PROG
(Python)
import math
from sympy import Matrix
def a(n):
mat = Matrix(n, n, lambda i, j: (1 if math.gcd(i+1, j+1) % 2 != 0 and math.gcd(i+1, j+1) % 3 != 0 else 0) + (1 if i == j else 0))
return int(mat.det())
print([a(n) for n in range(53)])
CROSSREFS
Cf. A354354.
Sequence in context: A273693 A219967 A060505 * A336727 A316101 A211452
KEYWORD
sign,easy
AUTHOR
Shen Haochen, Mar 14 2026
STATUS
approved