# For the divisor function is $d(n^2)$ related to $d(n)$ knowing also n?

The divisor function d(n) is defined as 'the number of positive divisors of n (including 1 and n)' according to Underwood Dudley.

Is the divisor function $$d(n^2)$$ related to $$d(n)$$?

for example

d(10)=4 and $$d(10^2)$$=9
or d(14)=4 and $$d(14^2)=9$$

So can one find the $$d(n^2)$$ from knowing only d(n) and n through some relation or function?

Has any work been done on this problem?

• Just to be clear, $d$ doesn't count the number itself, so for any prime it gives $1$? – Arthur Aug 3 at 13:39
• @Arthur okay thanks I'll remove 1 from each – onepound Aug 3 at 13:40
• You should get $d(n^2) = 2^k d(n)$, where $k$ is the number of "distinct" primes in $n$ – rsadhvika Aug 3 at 13:40
• @rsadhvika so for n=100 $2^2*2=8$? – onepound Aug 3 at 13:42
• I don't understand that function $d$. – ajotatxe Aug 3 at 13:45

There is no direct way to get from the value of $$d(n)$$ to the value of $$d(n^2)$$ without involving $$n$$. For instance, we have $$d(6)=d(8)=3$$, but $$d(36)=8$$ while $$d(64)=6$$.
Your divisor function is closely related to prime factorisations. If $$n=2^{e_2}\cdot3^{e_3}\cdot5^{e_5}\cdots$$ (where most of the $$e_k$$ are $$0$$), then $$d(n)=(e_2+1)(e_3+1)(e_5+1)\cdots-1$$ Squaring $$n$$ doubles all the $$e_k$$. For the example above, we have $$d(6)=(1+1)(1+1)-1=3 d(8)=(3+1)-1=3\\ d(36)=(2+1)(2+1)-1\\ d(64)=(6+1)-1=6$$ So for each way you can write $$d(n)+1$$ as a product of natural numbers greater than $$1$$, there is a different value to $$d(n^2)$$.
• @onepound If we know $n$, then we may calculate $d(n^2)$ without involving $d(n)$. I don't know a way to calculate $d(n^2)$ from $n$ and $d(n)$ which involves $d(n)$ in any crucial way, but there may be one. – Arthur Aug 3 at 13:54
Let $$n=\prod\limits_{i=1}^{\omega(n)}p_i^{a_i},\,a_i>0$$ so $$d(n)=\prod\limits_{i=1}^{\omega(n)}(1+a_i)$$. Then $$n^2=\prod\limits_{i=1}^{\omega(n)}p_i^{2a_i}$$ so $$d(n^2)=\prod\limits_{i=1}^{\omega(n)}(1+2a_i)$$ which cannot be expressed purely in terms of $$d(n)$$.