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.

A330190 Symmetric matrix read by antidiagonals: f(i,j) = 1 + gcd(f(i-1,j), f(i,j-1)), where f(1,j) and f(i,1) are 1.

Original entry on oeis.org

1, 1, 1, 1, 2, 1, 1, 2, 2, 1, 1, 2, 3, 2, 1, 1, 2, 2, 2, 2, 1, 1, 2, 3, 3, 3, 2, 1, 1, 2, 2, 4, 4, 2, 2, 1, 1, 2, 3, 3, 5, 3, 3, 2, 1, 1, 2, 2, 4, 2, 2, 4, 2, 2, 1, 1, 2, 3, 3, 3, 3, 3, 3, 3, 2, 1, 1, 2, 2, 4, 4, 4, 4, 4, 4, 2, 2, 1, 1, 2, 3, 3, 5, 5, 5, 5, 5, 3, 3, 2, 1
Offset: 1

Views

Author

Nathaniel J. Strout, Dec 04 2019

Keywords

Comments

This matrix when displayed in a gray scale, from least to greatest, forms spikes of increasing numbers because large sections of the antidiagonals are the same number. See examples section.

Examples

			An example of a triangle described in the comment:
  ...........
  ...........
  ..........2
  ........2 3
  ......2 3 4
  ....2 3 4 5
Array begins:
  1, 1, 1, 1, 1, 1, 1, 1, 1, 1, ...
  1, 2, 2, 2, 2, 2, 2, 2, 2, 2, ...
  1, 2, 3, 2, 3, 2, 3, 2, 3, 2, ...
  1, 2, 2, 3, 4, 3, 4, 3, 4, 3, ...
  1, 2, 3, 4, 5, 2, 3, 4, 5, 2, ...
  1, 2, 2, 3, 2, 3, 4, 5, 6, 3, ...
  1, 2, 3, 4, 3, 4, 5, 6, 7, 2, ...
  1, 2, 2, 3, 4, 5, 6, 7, 8, 3, ...
  1, 2, 3, 4, 5, 6, 7, 8, 9, 4, ...
  1, 2, 2, 3, 2, 3, 2, 3, 4, 5, ...
  ...
		

Programs

  • Mathematica
    f[1, j_] := f[1, j] = 1; f[i_, 1] := f[i, 1] = 1; f[i_, j_] := f[i, j] = 1 + GCD[f[i - 1, j], f[i, j - 1]]; Table[f[m - k + 1, k], {m, 13}, {k, m, 1, -1}] // Flatten (* Michael De Vlieger, Aug 03 2022 *)
  • PARI
    T(n)={my(M=matrix(n,n,i,j,1)); for(i=2, n, for(j=2, n, M[i,j] = 1 + gcd(M[i-1,j], M[i,j-1]))); M}
    { my(A=T(10)); for(i=1, #A, print(A[i,])) } \\ Andrew Howroyd, Jan 25 2020