login
Symmetric matrix based on f(i,j) = gcd(prime(i+1),prime(j+1)), by antidiagonals.
3

%I #11 Sep 25 2018 20:50:44

%S 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,

%T 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,

%U 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

%N Symmetric matrix based on f(i,j) = gcd(prime(i+1),prime(j+1)), by antidiagonals.

%C A204120 represents the matrix M given by f(i,j)=GCD(prime(i+1),prime(j+1)) for i>=1 and j>=1. See A204121 for characteristic polynomials of principal submatrices of M, with interlacing zeros. See A204016 for a guide to other choices of M.

%C Square array with odd primes (A065091) on main diagonal, and 1 at all other entries; array A204118 without its top row and the leftmost column. - _Antti Karttunen_, Sep 25 2018

%H Antti Karttunen, <a href="/A204120/b204120.txt">Table of n, a(n) for n = 1..65703 (the first 362 antidiagonals of array)</a>

%e Northwest corner:

%e 3 1 1 1

%e 1 5 1 1

%e 1 1 7 1

%e 1 1 1 11

%t f[i_, j_] := GCD[Prime[i + 1], Prime[j + 1]];

%t m[n_] := Table[f[i, j], {i, 1, n}, {j, 1, n}]

%t TableForm[m[8]] (* 8x8 principal submatrix *)

%t Flatten[Table[f[i, n + 1 - i],

%t {n, 1, 15}, {i, 1, n}]] (* A204120 *)

%t p[n_] := CharacteristicPolynomial[m[n], x];

%t c[n_] := CoefficientList[p[n], x]

%t TableForm[Flatten[Table[p[n], {n, 1, 10}]]]

%t Table[c[n], {n, 1, 12}]

%t Flatten[%] (* A204121 *)

%t TableForm[Table[c[n], {n, 1, 10}]]

%o (PARI)

%o up_to = 65703; \\ = binomial(362+1,2)

%o A204120sq(row,col) = gcd(prime(1+row),prime(1+col));

%o 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); };

%o v204120 = A204120list(up_to);

%o A204120(n) = v204120[n]; \\ _Antti Karttunen_, Sep 25 2018

%Y Cf. A065091 (main diagonal), A204118, A204121, A204016, A202453.

%K nonn,tabl

%O 1,1

%A _Clark Kimberling_, Jan 11 2012