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.

Showing 1-3 of 3 results.

A374433 Triangle read by rows: T(n, k) = Product_{p in PF(n) intersect PF(k)} p, where PF(a) is the set of the prime factors of a.

Original entry on oeis.org

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

Views

Author

Peter Luschny, Jul 10 2024

Keywords

Examples

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

Crossrefs

Family: this sequence (intersection), A374434 (symmetric difference), A374435 (difference), A374436 (union).
Cf. A007947 (main diagonal and central terms), A374432 (row sums), A374431 (row product).

Programs

  • Maple
    PF := n -> ifelse(n = 0, {}, NumberTheory:-PrimeFactors(n)):
    A374433 := (n, k) -> mul(PF(n) intersect PF(k)):
    seq(seq(A374433(n, k), k = 0..n), n = 0..12);
  • Mathematica
    nn = 12; Do[Set[s[i], FactorInteger[i][[All, 1]]], {i, 0, nn}]; s[0] = {1};
    Table[Times @@ Intersection[s[k], s[n]], {n, 0, nn}, {k, 0, n}] // Flatten (* Michael De Vlieger, Jul 11 2024 *)
  • Python
    from math import prod
    from sympy import primefactors
    def PF(n): return set(primefactors(n)) if n > 0 else set({})
    def PrimeIntersect(n, k): return prod(PF(n).intersection(PF(k)))
    def PrimeSymDiff(n, k): return prod(PF(n).symmetric_difference(PF(k)))
    def PrimeUnion(n, k): return prod(PF(n).union(PF(k)))
    def PrimeDiff(n, k): return prod(PF(n).difference(PF(k)))
    A374433 = PrimeIntersect; A374434 = PrimeSymDiff
    A374435 = PrimeDiff; A374436 = PrimeUnion
    for n in range(11): print([A374433(n, k) for k in range(n + 1)])

Formula

T(n, k) = 1 for k = 0, for k > 0: T(n, k) = rad(gcd(n, k)), where rad = A007947 and gcd = A050873. - Michael De Vlieger, Jul 11 2024

A374434 Triangle read by rows: T(n, k) = Product_{p in PF(n) symmetric difference PF(k)} p, where PF(a) is the set of the prime factors of a.

Original entry on oeis.org

1, 1, 1, 2, 2, 1, 3, 3, 6, 1, 2, 2, 1, 6, 1, 5, 5, 10, 15, 10, 1, 6, 6, 3, 2, 3, 30, 1, 7, 7, 14, 21, 14, 35, 42, 1, 2, 2, 1, 6, 1, 10, 3, 14, 1, 3, 3, 6, 1, 6, 15, 2, 21, 6, 1, 10, 10, 5, 30, 5, 2, 15, 70, 5, 30, 1, 11, 11, 22, 33, 22, 55, 66, 77, 22, 33, 110, 1
Offset: 0

Views

Author

Peter Luschny, Jul 10 2024

Keywords

Examples

			  [ 0]  1;
  [ 1]  1,  1;
  [ 2]  2,  2,  1;
  [ 3]  3,  3,  6,  1;
  [ 4]  2,  2,  1,  6,  1;
  [ 5]  5,  5, 10, 15, 10,  1;
  [ 6]  6,  6,  3,  2,  3, 30,  1;
  [ 7]  7,  7, 14, 21, 14, 35, 42,  1;
  [ 8]  2,  2,  1,  6,  1, 10,  3, 14,  1;
  [ 9]  3,  3,  6,  1,  6, 15,  2, 21,  6,  1;
  [10] 10, 10,  5, 30,  5,  2, 15, 70,  5, 30,   1;
  [11] 11, 11, 22, 33, 22, 55, 66, 77, 22, 33, 110, 1;
		

Crossrefs

Family: A374433 (intersection), this sequence (symmetric difference), A374435 (difference), A374436 (union).
Cf. A007947 (column 0), A000034 (central terms), A050873 (gcd).

Programs

  • Maple
    PF := n -> ifelse(n = 0, {}, NumberTheory:-PrimeFactors(n)):
    A374434 := (n, k) -> mul(symmdiff(PF(n), PF(k))):
    seq(print(seq(A374434(n, k), k = 0..n)), n = 0..11);
  • Mathematica
    nn = 12; Do[Set[s[i], FactorInteger[i][[All, 1]]], {i, 0, nn}]; s[0] = {1}; Table[Times @@ SymmetricDifference[s[k], s[n]], {n, 0, nn}, {k, 0, n}] // Flatten (* Michael De Vlieger, Jul 11 2024 *)
  • Python
    # Function A374434 defined in A374433.
    for n in range(11): print([A374434(n, k) for k in range(n + 1)])

Formula

From Michael De Vlieger, Jul 11 2024: (Start)
T(0,0) = T(n,0) = rad(n)/rad(0) = 1 where rad = A007947;
T(n,k) = rad(k*n)/rad(gcd(k,n))
= A007947(k*n)/A007947(S(n,k)) where S = A050873
= A374436(n,k)/A374433(n,k). (End)

A374435 Triangle read by rows: T(n, k) = Product_{p in PF(n) difference PF(k)} p, where PF(a) is the set of the prime factors of a.

Original entry on oeis.org

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

Views

Author

Peter Luschny, Jul 10 2024

Keywords

Examples

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

Crossrefs

Family: A374433 (intersection), A374434 (symmetric difference), this sequence (difference), A374436 (union).
Cf. A007947 (column 0), A000034 (central terms).

Programs

  • Maple
    PF := n -> ifelse(n = 0, {}, NumberTheory:-PrimeFactors(n)):
    A374435 := (n, k) -> mul(PF(n) minus PF(k)):
    seq(print(seq(A374435(n, k), k = 0..n)), n = 0..11);
  • Mathematica
    nn = 12; Do[Set[s[i], FactorInteger[i][[All, 1]]], {i, 0, nn}]; s[0] = {1}; Table[Apply[Times, Complement[s[n], s[k]]], {n, 0, nn}, {k, 0, n}] // Flatten (* Michael De Vlieger, Jul 11 2024 *)
  • Python
    # Function A374435 defined in A374433.
    for n in range(12): print([A374435(n, k) for k in range(n + 1)])
Showing 1-3 of 3 results.