Number of ordered triples $(a,b,c)$ such that $abc=n$

combinatoricselementary-number-theoryparity

I am trying to investigate the situation above, or more weakly I am wondering about the parity of this number depending on $n$.

This came about because I know that the number of ordered pairs $(a,b)$ with $ab=n$ is just another way of saying the number of divisors, which is odd $\iff $ $n$ is square.

Initially I thought the number would be odd $\iff $ $n$ is a cube, (true for $n$ prime and $n=pq$ with $p,q$ prime from my tests), but I then realised it is odd for $n=4,\; n=6$ too, unless I've miscounted somewhere. Maybe it is always odd.

I believe it entirely depends on how many $a$ are such that $a^2b=n$, because these each give $3$ triples, or $1$ if $a=b$. In other words, the number of square factors.

I am stuck on how to count this though, even considering prime decomposition.

I don't think this can be related to weak compositions because the triples are ordered.


Am I overcomplicating this?

Best Answer

Assuming that $n$ can be factored as $p_1^{\alpha_1}\cdot\ldots\cdot p_k^{\alpha_k}$, the number of triples $(a,b,c)\in\mathbb{N}^3$ such that $abc=n$ is given by the number of ways to distribute $p_1^{\alpha_1}$ among $a,b,c$ and so on, i.e. by

$$ \prod_{h=1}^{k}r_3(\alpha_h) $$ where $$\begin{eqnarray*} r_3(m) &=& \left|\{(u,v,w)\in\mathbb{N}^3:u+v+w=m\}\right| \\&=&[x^m]\frac{1}{(1-x)^3}=\frac{(m+1)(m+2)}{2}\end{eqnarray*}$$ by stars and bars. This leads to $$ \prod_{h=1}^{\omega(n)}\frac{(\nu_{p_h}(n)+1)(\nu_{p_h}(n)+2)}{2} $$ which is odd iff all its factors are odd, i.e. iff all the exponents in the factorization of $n$ are of the form $4k$ or $4k+1$. It follows that $$ R(n)=\left|\{(a,b,c)\in\mathbb{N}^3:abc=n\}\right| $$ is always even, unless $n$ is the product between a fourth power and a square-free number. The density of these numbers in $\mathbb{N}$ is $\frac{\zeta(4)}{\zeta(2)}=\color{red}{\frac{\pi^2}{15}}\approx\frac{25}{38}$. Notice that for $n=4$ we have six triples, namely $(4,1,1),(1,4,1),(1,1,4),(1,2,2),(2,1,2),(2,2,1)$. For $n=6$ we have nine triples, given by the cyclic permutations of $(6,1,1)$ and the permutations of $(1,2,3)$. Indeed $6$ is a square-free number. It is also interesting to point out that $$ R(n) = \sum_{d\mid n}\tau(d) = (\tau * 1)(n) $$ is a multiplicative function whose associated Dirichlet series equals $$ f(s)=\sum_{n\geq 1}\frac{R(n)}{n^s}=\sum_{n\geq 1}\frac{1}{n^s}\sum_{n\geq 1}\frac{\tau(n)}{n^s} = \zeta(s)^3. $$ The RHS behaves like $\frac{1}{(s-1)^3}$ in a right neighbourhood of $s=1$, hence the average order of $R(n)$ is $\frac{1}{2}\log^2(n)+O(\log n)$.