cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

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

Original entry on oeis.org

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

Views

Author

Clark Kimberling, Jan 11 2012

Keywords

Comments

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.
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

Examples

			Northwest corner:
3 1 1 1
1 5 1 1
1 1 7 1
1 1 1 11
		

Crossrefs

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

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