A204120 Symmetric matrix based on f(i,j) = gcd(prime(i+1),prime(j+1)), by antidiagonals.
3, 1, 1, 1, 5, 1, 1, 1, 1, 1, 1, 1, 7, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 11, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 13, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 17, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 19, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1
Offset: 1
Examples
Northwest corner: 3 1 1 1 1 5 1 1 1 1 7 1 1 1 1 11
Links
Programs
-
Mathematica
f[i_, j_] := GCD[Prime[i + 1], Prime[j + 1]]; m[n_] := Table[f[i, j], {i, 1, n}, {j, 1, n}] TableForm[m[8]] (* 8x8 principal submatrix *) Flatten[Table[f[i, n + 1 - i], {n, 1, 15}, {i, 1, n}]] (* A204120 *) p[n_] := CharacteristicPolynomial[m[n], x]; c[n_] := CoefficientList[p[n], x] TableForm[Flatten[Table[p[n], {n, 1, 10}]]] Table[c[n], {n, 1, 12}] Flatten[%] (* A204121 *) TableForm[Table[c[n], {n, 1, 10}]]
-
PARI
up_to = 65703; \\ = binomial(362+1,2) A204120sq(row,col) = gcd(prime(1+row),prime(1+col)); A204120list(up_to) = { my(v = vector(up_to), i=0); for(a=1,oo, for(col=1,a, if(i++ > up_to, return(v)); v[i] = A204120sq((a-(col-1)),col))); (v); }; v204120 = A204120list(up_to); A204120(n) = v204120[n]; \\ Antti Karttunen, Sep 25 2018
Comments