TITLE: Find all positive integers such that $\lfloor{\sqrt{n}\rfloor} \mid n$
QUESTION [7 upvotes]: How does one find the no of positive integers such that find all possible numbers such that $$\lfloor{\sqrt{n}\rfloor} \mid n$$
What i did was to subsitute $n=t^{2}$ so that the equation becomes $\lfloor{t\rfloor} \mid t^{2}$ But this means that we want $t^{2} = k \lfloor{t\rfloor}$, where $k \in \mathbb{N}$. I don't really know what to do from here. By the way, this problem is in Apostol.

REPLY [20 votes]: I suppose you want to find all possible numbers such that $\displaystyle [\sqrt{n}] \mid n$.
Assume $\displaystyle n$ is not a perfect square, then there must be some $\displaystyle k$ such that
$\displaystyle  k^2 < n < (k+1)^2$. We have that $\displaystyle k = [\sqrt{n}]$.
The only numbers in the range $\displaystyle  k^2 < n < (k+1)^2$ which are divisible by $k$ are $\displaystyle k^2+k$ and $\displaystyle k^2+2k$.
Thus the numbers $\displaystyle n$ such that $\displaystyle [\sqrt{n}] \mid n$ are of the form
$\displaystyle k^2, k^2+k, k^2+2k$