$N=2^8\times3^7\times5^6$, if $A\times B=N$, how many different HCFs can $A$ and $B$ have? My approach:-
The HCFs will have some powers of $2,3,5$:- and for different HCFs $2$ can have powers of $0,1,2,3,4$; $3$ can have powers of $0,1,2,3$; and $5$ can have powers of $0,1,2,3$; so count of different HCFs= $5\times4\times4=80$;
My answer did match with the answer in the book, however I have a doubt in the explanation they have used to arrive at the answer and that is they found out the number of factors of N which are perfect square so $2$ can have the powers of $0,2,4,6,8$  ; $3$ can have the powers $0,2,4,6$; and $5$ will have powers of $0,2,4,6$; so total perfect square factors - $5\times4\times4=80 $ ways
is there any relation between HCFs and perfect squares functionality , why are the answers matching ? I did try for small numbers and the answer through both approaches are still matching, why is it happening like this ?
 A: Something interesting that I found, is your problem may follow the HyperGeometric or Binomial distribution.
Ie. Let $A = 2^{m}3^75^6$, $B= 2^{8 - m}$ where $m$ is variable and $0 \le m \le 8$.
We can have the cases:
$$\big[m = 8\big] \to HCF = 1, \big[m = 7\big] \to HCF = 2, \big[m = 6\big] \to HCF = 4$$
$$\big[m = 5\big] \to HCF = 8, \big[m = 4\big] \to HCF = 16$$
After this we obtain repetition. This could be considered one distribution for the prime factor of $2$.
You can create $2$ other independent distributions for prime factors $3$ and $5$. Maybe then, you can add them to create a combined one and calculate you required total.
A: If you find how many perfect squares divide $N$ the square root of each is a possible HCF.  You take that square root and assign the factors to both A and B then assign the remaining factors so they do not raise the HCF.  One way is to assign all the remaining ones to A.
It is really the same computation you are doing.  They count the even numbers less than or equal to the power of each prime.  You count all the numbers less than or equal to half the power of each prime.  Either approach gives the $5,4,4$ that you multiplied together.
