Home

divisorcountmn

Divisorcountmn is a function used in number theory and computer algebra to quantify the number of divisors associated with a pair of integers. In the common interpretation, divisorcountmn(m, n) equals the number of positive divisors of the greatest common divisor of m and n. This is equivalent to applying the ordinary divisor-counting function d(k) to gcd(m, n).

Formally, divisorcountmn(m, n) = d(gcd(m, n)), where d(k) is the number of positive divisors of k. If

Computing divisorcountmn involves first determining gcd(m, n) and then counting its divisors, typically via prime factorization

Example: let m = 36 and n = 48. Their gcd is 12, which has divisors 1, 2, 3,

Variants exist in literature and software. Some sources define divisorcountmn using d(lcm(m, n)) or as the product

Related concepts include the divisor function d(n), the gcd and lcm operations, and multiplicative functions. The

gcd(m,
n)
factors
as
∏
p_i^{e_i},
then
divisorcountmn(m,
n)
=
∏
(e_i
+
1).
The
value
depends
only
on
the
shared
prime
factors
of
m
and
n,
and
is
symmetric
in
m
and
n.
or
using
a
precomputed
table
of
divisor
counts.
In
practice,
for
large
inputs,
factoring
gcd(m,
n)
is
the
main
cost.
4,
6,
12.
Therefore
divisorcountmn(36,
48)
=
6.
d(m)·d(n)
for
unrelated
purposes.
The
chosen
definition
should
be
specified
in
any
implementation
or
discussion.
function
is
primarily
used
in
exploratory
number
theory,
combinatorial
counting,
and
algorithmic
number
theory
where
joint
divisor
structure
of
a
pair
is
relevant.