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.

A382944 Table read by rows: T(n, k) = valuation(n, k) for k >= 2, 1 for k = 1 and 0^n for k = 0.

Original entry on oeis.org

1, 0, 1, 0, 1, 1, 0, 1, 0, 1, 0, 1, 2, 0, 1, 0, 1, 0, 0, 0, 1, 0, 1, 1, 1, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 1, 0, 1, 3, 0, 1, 0, 0, 0, 1, 0, 1, 0, 2, 0, 0, 0, 0, 0, 1, 0, 1, 1, 0, 0, 1, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 2, 1, 1, 0, 1, 0, 0, 0, 0, 0, 1
Offset: 0

Views

Author

Peter Luschny, Apr 09 2025

Keywords

Comments

If a term T(n, k) > 1 is replaced by 1 the triangle reduces to the divisibility triangle A113704. In addition to divisibility, T(n, k) indicates the order of divisibility. For n, k >= 2 this is defined as the multiplicity of a divisor, i.e., the exponent of the highest order of k that divides n. For a prime number p T(n, p) is called p-adic valuation or p-adic order of n. See also the comments in A382883.

Examples

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

Crossrefs

Cf. A169594 (row sums), A113704, A382881 (inverse), A382883, A057427.

Programs

  • Maple
    A382944 := proc(n, k) if k = 0 then 0^n elif k = 1 then 1 else padic:-ordp(n, k) fi end: seq(seq(A382944(n, k), k = 0..n), n = 0..12);
  • Mathematica
    T[n_, 0] := T[n, 0] = Boole[n == 0]; T[n_, 1] := T[n, 1] = 1; T[n_, k_] := T[n, k] = IntegerExponent[n, k]; Table[T[n, k], {n, 0, 12}, {k, 0, n}] // Flatten (* Amiram Eldar, Apr 29 2025 *)
  • SageMath
    @cached_function
    def A382944(n: int, k: int) -> int:
        if not ZZ(k).divides(n) or k > n: return 0
        if k == n or k == 1: return 1
        return valuation(n, k)
    for n in range(13): print([n], [A382944(n, k) for k in range(n + 1)])

Formula

A113704(n, k) = A057427(T(n, k)). - Amiram Eldar, Apr 29 2025