A recursive divisor function Question:
Function definition:
$$f(1)=1$$
$$f(p)=p$$ where $p$ is a prime, and
$$f(n)=\prod {f(d_n)}$$ where $d_n$ are the divisors of $n$ except $n$ itself.
End result: 
The end result of the function is when all divisors have been reduced to primes or 1.
Example:$$f(12)=f(2)f(3)f(4)f(6)=f(2)f(3)f(2)f(2)f(3)=f(2)^3f(3)^2=72$$
Question parts:  
(a) Find a general formula for $f(a^n)$ where $a$ is a prime and $n$ is a natural number.
(b) Find a general formula for $f(a^nb^m)$ (following same notation). [Note: $a$ and $b$ are unique primes. $n$ and $m$, however, may be equal.]
Attempts at solutions:  
(a) We have solved it. The solution is:
$a^{2^{n-2}}$ if $n≥2$,
$a$ if $n=1$.  
(b) As of yet, none of us (me and my colleagues) have come up with a solution. We have solved the special cases
$$f(ab^m)=a^{2^{m-1}} \times b^{(2^{m-2})(m+1)}$$
$$f(a^2b^m)=a^{(2^{m-1})(m+2)} \times b^{(2^{m-2})(m^2+5m+2)/2}$$
$$f(a^3b^m)=a^{(2^{m-1})(m^2+7m+8)/2} \times b^{(2^{m-2})(m^3+12m^2+29m+6)/6}$$
Update 1: $f(a^4b^m)$ has been solved as well.
$$f(a^4b^m)=a^{(2^{m-1})(m^3+15m^2+56m+48)/6} \times b^{(2^{m-2})(m^4+22m^3+131m^2+206m+24)/24}$$
An answer to the above questions is needed. A general formula for $f(n)$ is appreciated, along with an explanation.
 A: The polynomials in the exponent of $b$ can be written
$${m+1\choose1}\\{m+3\choose2}-{2\choose1}\\
{m+5\choose3}-{3\choose1}{m+3\choose1}\\
{m+7\choose4}-{4\choose1}{m+5\choose2}+{4\choose2}$$
The values at $m=0,1,2$ are $1,2^k,2^{k-1}(k+2)$ so I predict the next two polynomials are 
$${m+9\choose5}-{5\choose1}{m+7\choose3}+{5\choose2}{m+5\choose1}\\
{m+11\choose6}-{6\choose1}{m+9\choose4}+{6\choose2}{m+7\choose2}-{6\choose3}$$
The polynomial for $a$ is the polynomial for $b$ coming from $m+1$ and $n−1.$
A: I Found
$$f(a^n\cdot b^m) = a^{{(2^{m})}{(m-1)}} \cdot b^{{(2^{m-2})}{(m+1)}} \cdot 
\prod _{j=1} ^{m} \prod _{i=1} ^{n-1} f(a^i\cdot b^{j})^{2^{m-j}}$$
A: So, the friend who originally came up with this question also came up with a solution for it.
$$f(a^mb^n)=a^{[F(m-1,n)]}\times{b^{[F(m,n-1)]}}$$
where
$$F(m,n)=\frac{1}{2}\sum_{i=0}^{min(m,n)}{2^{m+n-i}\times{(-1)^i}\times{\frac{(m+n-i)!}{(m-i)!(n-i)!i!}}}$$
Note: $[X]$ is smallest integer larger than $X$.
I believe the above is a correct answer to part (b) of the question. Now only an answer to the final part (which was not part of the original question) is needed, which is to find a general formula for $f(n)$ where $n$ is any natural number.
