Let <span>nn</span> be any positive integer, and let <span><span>d(n)</span><span>d(n)</span></span> denote the number of positive divisors of <span>nn</span>. Positive divisors of <span>nn</span> appear in pairs <span><span>{a,<span>na</span>}</span><span>{a,<span>na</span>}</span></span>. Pairs of divisors <span>aa</span>, <span><span>na</span><span>na</span></span> are distinct except when <span><span>n=<span>a2</span></span><span>n=<span>a2</span></span></span>. So if <span>nn</span> is not a perfect square, <span><span>d(n)</span><span>d(n)</span></span> is <span>even. </span>If <span>nn</span> is a perfect square, then <span><span>d(n)</span><span>d(n)</span></span> is odd. In other words,
<span><span><span>d(n)</span><span>d(n)</span></span> is odd if and only if <span>nn</span> is a perfect square.</span>
Determining one of <span>aa</span>, <span><span>na</span><span>na</span></span> fixes the other <span><span>‘‘</span><span>‘‘</span></span>complimentary<span>””</span> divisor. Therefore the number of ways in which we can write <span><span>n=a⋅b=a⋅<span>na</span></span><span>n=a⋅b=a⋅<span>na</span></span></span> is the number of ways in which we can choose <span>aa</span>.
If <span>nn</span> is not a perfect square, the number of such choices equals <span><span><span>12</span>d(n)</span><span><span>12</span>d(n)</span></span>.
If <span>nn</span> is a perfect square, the number of such choices equals <span><span><span>12</span>(d(n)−1)</span><span><span>12</span>(d(n)−1)</span></span>. We may combine the two cases by the expression
<span><span>⌊<span><span>d(n)</span>2</span>⌋</span><span>⌊<span><span>d(n)</span>2</span>⌋</span></span>.