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.

A374443 Triangle read by rows: T(n, k) = rad(gcd(n, k)) if n, k > 0, T(0, 0) = 1, where rad = A007947 and gcd = A109004.

Original entry on oeis.org

1, 1, 1, 2, 1, 2, 3, 1, 1, 3, 2, 1, 2, 1, 2, 5, 1, 1, 1, 1, 5, 6, 1, 2, 3, 2, 1, 6, 7, 1, 1, 1, 1, 1, 1, 7, 2, 1, 2, 1, 2, 1, 2, 1, 2, 3, 1, 1, 3, 1, 1, 3, 1, 1, 3, 10, 1, 2, 1, 2, 5, 2, 1, 2, 1, 10, 11, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 11, 6, 1, 2, 3, 2, 1, 6, 1, 2, 3, 2, 1, 6
Offset: 0

Views

Author

Keywords

Examples

			Triangle starts:
  [ 0]  1;
  [ 1]  1, 1;
  [ 2]  2, 1, 2;
  [ 3]  3, 1, 1, 3;
  [ 4]  2, 1, 2, 1, 2;
  [ 5]  5, 1, 1, 1, 1, 5;
  [ 6]  6, 1, 2, 3, 2, 1, 6;
  [ 7]  7, 1, 1, 1, 1, 1, 1, 7;
  [ 8]  2, 1, 2, 1, 2, 1, 2, 1, 2;
  [ 9]  3, 1, 1, 3, 1, 1, 3, 1, 1, 3;
  [10] 10, 1, 2, 1, 2, 5, 2, 1, 2, 1, 10;
  [11] 11, 1, 1, 1, 1, 1, 1, 1, 1, 1,  1, 11;
		

Crossrefs

Variant: A374433.
Cf. A374442 (row sums), A007947, A109004.

Programs

  • Maple
    rad := n -> ifelse(n = 0, 1, NumberTheory:-Radical(n)):
    T := (n, k) -> rad(igcd(n, k)); seq(seq(T(n, k), k = 0..n), n = 0..11);
  • Mathematica
    rad[n_] := If[n == 0, 1, Product[p, {p, Select[Divisors[n], PrimeQ]}]];
    T[n_, k_] := rad[GCD[n, k]]; Table[T[n, k], {n, 0, 10}, {k, 0, n}] // Flatten
  • Python
    from math import gcd, prod
    from sympy.ntheory import primefactors
    def T(n, k) -> int: return prod(primefactors(gcd(n, k)))
    for n in range(16): print([T(n, k) for k in range(n+1)])  # Peter Luschny, Jun 22 2025