<s>[INST] Product/division of exponencials with factorials as the base I put this formula on WolframAlpha $$\frac{(26!)^{n+2}}{13!}$$ and it simplified to $$2^{23n+36}\cdot175^{3n+5}\cdot7429^{n+2}\cdot34749^{2n+3}$$
I tried solving it by hand
\begin{align}
\frac{(26!)^{n+2}}{13!} & = \frac{(26\cdot25\cdot\ldots\cdot3\cdot2)^{n+2}}{13\cdot12\cdot\ldots\cdot3\cdot2} \\\\
& = (26\cdot25\cdot\ldots\cdot15\cdot14)^{n+2} \cdot (13\cdot12\cdot\ldots\cdot3\cdot2)^{n+1} \\\\
& = (2^{13}\cdot3^5\cdot5^4\cdot7^2\cdot11\cdot13\cdot17\cdot19\cdot23)^{n+2}\cdot(2^{10}\cdot3^5\cdot5^2\cdot7\cdot11\cdot13)^{n+1} \\\\
& = 2^{23n+36}\cdot(3^5)^{2n+3}\cdot(5^2)^{3n+5}\cdot7^{3n+5}\cdot11^{2n+3}\cdot13^{2n+3}\cdot17^{n+2}\cdot19^{n+2}\cdot23^{n+2} \\\\
& = 2^{23n+36}\cdot(5^2\cdot7)^{3n+5}\cdot(17\cdot19\cdot23)^{n+2}\cdot(3^5\cdot11\cdot13)^{2n+3}\\\\
& = 2^{23n+36}\cdot175^{3n+5}\cdot7429^{n+2}\cdot34749^{2n+3}\\
\end{align}
My question is do I have to do all this work (prime factorization of factorials) everytime I want to simplify an expression of this kind or is there a faster way using Discrete Mathematics?
 [/INST] For more systematic approach, let $v_p(x)$ be a $p$-adic valuation of $x$, then by some basic rules such as $v_p(x^n)=n\cdot v_p(x)$ and $v_p(x/y)=v_p(x)-v_p(y)$. Also we can use Legendre's formula  $v_p(n!)=\sum_{i=1}^{\infty}\lfloor \frac{n}{p^i} \rfloor$, so
\begin{align}
v_2\left(\frac{(26!)^{n+2}}{13!}\right)&=(n+2)v_2(26!)-v_2(13!)\\
&=(n+2)\left(\left\lfloor \frac{26}{2} \right\rfloor + \left\lfloor \frac{26}{4} \right\rfloor + \left\lfloor \frac{26}{8} \right\rfloor + \left\lfloor \frac{26}{16} \right\rfloor  \right)\\
&\ \ \ -\left(\left\lfloor \frac{13}{2} \right\rfloor + \left\lfloor \frac{13}{4} \right\rfloor + \left\lfloor \frac{13}{8} \right\rfloor  \right)\\
&=(n+2)(13+6+3+1)-(6+3+1)\\
&=23n+36.\\
\end{align}
Now just continue in similar manner for $p=3,5,7,11,13,17,19,23$ to obtain complete factorization. Then you can group the terms together in any way you like.
</s>