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.

A242224 Triangular array T read by rows, T(n, k) = n*k*(gcd(n,k)+2)/gcd(n,k)^2.

Original entry on oeis.org

3, 6, 4, 9, 18, 5, 12, 8, 36, 6, 15, 30, 45, 60, 7, 18, 12, 10, 24, 90, 8, 21, 42, 63, 84, 105, 126, 9, 24, 16, 72, 12, 120, 48, 168, 10, 27, 54, 15, 108, 135, 30, 189, 216, 11, 30, 20, 90, 40, 14, 60, 210, 80, 270, 12, 33, 66, 99, 132, 165, 198, 231, 264, 297, 330, 13
Offset: 1

Views

Author

Michel Marcus, May 08 2014

Keywords

Comments

Described in the CNRS link as a puzzle where op(n,k) is defined by: op(n,n)=n+2, op(n,k)=op(k,n) and op(n,n+k)/op(n,k)=(n+k)/k.
If gcd(n,k)+2 is replaced by gcd(n,k), then triangle A051173 is obtained.

Examples

			Triangle begins:
   3;
   6,  4;
   9, 18,  5;
  12,  8, 36,  6;
  15, 30, 45, 60,  7;
  18, 12, 10, 24, 90,  8;
  ...
		

Programs

  • Mathematica
    t[n_, k_] := n*k*(GCD[n, k] +2)/GCD[n, k]^2; Table[ t[n, k], {n, 12}, {k, n}] // Flatten (* Robert G. Wilson v, Jan 21 2018 *)
  • PARI
    tabl(nn) = {for (n=1, nn, for (k=1, n, print1(n*k*(gcd(n,k)+2)/gcd(n,k)^2, ", ");); print(););}