Given $n$, what is the largest $m$ such that $m \mid a$ for all $a$ with $n \mid a^2$?
This is a generalization of if $40|a^2$ prove that $20|a$ when $a$ is an integer where $n=40$ and $m=20$.
Here is my solution.
Let $n = \prod p_i^{n_i} $, $m = \prod p_i^{m_i} $, and $a =\prod p_i^{a_i} $.
$n | a^2$ means that $n_i \le 2a_i $ or $a_i \ge \lceil \frac{n_i}{2} \rceil $.
$m | a$ means that $m_i \le a_i$. If $m$ is as large as possible, $m_i = a_i$, so $m_i = \lceil \frac{n_i}{2} \rceil $.
If $n = 40$, $n_i =(3, 0, 1) $, so $m_i =(2, 0, 1) $ and $m = 2^2 5 = 20 $.
Possible generalizations:
(1) Let $j \ge 2$ be an integer. Suppose $n \mid a^j $, What is the largest $m$ for which $m \mid a$?
(2) Let $j$ and $k$ be integers such that $j > k \ge 1$. Suppose $n \mid a^j $. What is the largest $m$ for which $m \mid a^k$?