So I was given this question:
$n = 2^{16}3^{19}17^{12}$
Find $\gcd(n, 40!)$ and $\operatorname{lcm}(n, 40!)$.
I understand how to find the GCD and LCM when its two really large numbers (given their prime factorization), But I'm not sure how Id do something like this. Given we're not allowed to use calculators, I assume there is a way to find this.
EDIT
So I did
(floor of each by the way)
v2(40!) = 40/2 + 40/4 + 40/8 + 40/16 + 40/32 = 38
v3(40!) = 40/3 + 40/9 + 40/27 = 18
v17(40!) = 40/17 = 2
So what do I do from here?
Hint: Find the highest power of $2$ that divides $40!$. Do the same for $3$ and $17$.
Solution:
$n = 2^{16}\cdot 3^{19}\cdot 17^{12}$
$40! = 2^{38} \cdot 3^{18} \cdot 17^2\cdot m$
$gcd(n,40!) = 2^{16} \cdot 3^{18} \cdot 17^2$
$lcm(n,40!) = \dfrac{n\cdot 40!}{gcd(n,40!) } = \dfrac{2^{16}\cdot 3^{19}\cdot 17^{12} \cdot 40!}{2^{16} \cdot 3^{18} \cdot 17^2} = 3\cdot 17^{10}\cdot 40!$