1

I can't seem to find a methodical/systematic way of solving:

How many integers $n$ are there with $4\le n\le 2019$ such that $\lfloor\sqrt n\rfloor\mid n$ and $\lfloor \sqrt {n+1}\rfloor\mid n+1$?

I found this question in the Philippine Math Olympiad 2020, Qualifying Rounds and I am lacking skills to find a method in answering this question.

cosmo5
  • 10,789

2 Answers2

2

First of all assume that $\lfloor\sqrt{n}\rfloor=\lfloor\sqrt{n+1}\rfloor=a$. Then $a|n$ and $a|n+1$ $\implies a=1$ which is only true if $n=1$. Otherwise $\lfloor\sqrt{n}\rfloor\not=\lfloor\sqrt{n+1}\rfloor$ and thus $\lfloor\sqrt{n}\rfloor+1=\lfloor\sqrt{n+1}\rfloor \iff n+1$ is a perfect square $\iff n=k^2-1$ for some positive integer $k$. Then $$k-1=\lfloor\sqrt{k^2-1}\rfloor|k^2-1 \hspace{50 pt}k=\lfloor\sqrt{k^2}\rfloor|k^2$$ which are both true. So all positive integers satisfying the two conditions are $1$ and the numbers of form $k^2-1$.

ARYAAAAAN
  • 1,709
2

$\lfloor \sqrt{n+1} \rfloor$ is either same as $\lfloor \sqrt{n} \rfloor$ or exceeds it by $1$ when $n+1$ is a perfect square.

So $n+1=m^2$, $\lfloor \sqrt{n+1} \rfloor=m$ and $n=m^2-1$, $\lfloor \sqrt{n} \rfloor=m-1$.

Since $m \mid m^2$ and $m-1 \mid m^2-1$, we're looking for all $n$'s for which $n+1$ is a perfect square.

cosmo5
  • 10,789