3

Prove that every non-square number is given by the sequence $$a(n) = n + \Big\lfloor \frac 12 + \sqrt n\Big\rfloor$$ where $\lfloor x \rfloor$ represents the greatest integer less than or equal to $x$.

Attempt: Let $n$ be some natural number. Then, we know that up to $n$, there are $\Big\lfloor \sqrt{n}\Big\rfloor$ perfect squares.

That means, the $nth$ non square number will in the range greater than or equal to $n+\Big\lfloor{\sqrt{n}}\Big\rfloor$. But some of the numbers in this range might also turn out to be square numbers! The challenge would be to weed out these square numbers.

Now, for any $n:\Big\lfloor \frac 12 + \sqrt {n}\Big\rfloor$ represents the nearest integer to $\sqrt{n}$. But, still thinking how I can use this result to prove the result above.

Any hints please? Thanks!

MathMan
  • 8,974
  • 7
  • 70
  • 135
  • "Now, for any $n:\Big\lfloor \frac 12 + \sqrt n\Big\rfloor$ represents the nearest integer to $n$." This is certainly false. – Gary Oct 07 '23 at 04:31
  • @Gary Corrected it – MathMan Oct 07 '23 at 04:33
  • 1
    This has been asked before: https://math.stackexchange.com/q/1079126/42969, https://math.stackexchange.com/q/1693033/42969, https://math.stackexchange.com/q/3771037/42969, https://math.stackexchange.com/q/850483/42969 – all found with Approach0 – Martin R Oct 07 '23 at 12:51

1 Answers1

6

The sequence can only skip over an integer between $a(n)$ and $a(n+1)$ if $\Big\lfloor \frac{1}{2} + \sqrt n\Big\rfloor$ increases, i.e., there is some integer $m$ with $$\frac{1}{2} + \sqrt{n}<m\leq \frac{1}{2} +\sqrt{n+1}\text{.}$$ Subtracting $\frac{1}{2}$ and squaring gives $$n<m^2-m+\frac{1}{4}\leq n+1\text{,}$$ whereby $$n\leq m^2-m<n+1,$$ which implies $n=m^2-m$. In this case, since $\sqrt{n+1}-\sqrt{n}\leq 1$ always, we also have $$\Big\lfloor \frac{1}{2} + \sqrt n\Big\rfloor=m-1$$ and $$\Big\lfloor \frac{1}{2} + \sqrt{n+1}\Big\rfloor=m.$$ Therefore, $$a(n)=n+\Big\lfloor \frac{1}{2} +\sqrt{n}\Big\rfloor=m^2-m+m-1 = m^2-1,$$ and $$a(n+1)=n+1+\Big\lfloor \frac{1}{2} +\sqrt{n+1}\Big\rfloor=m^2-m+1+m=m^2+1,$$ so only $m^2$ is skipped.

Therefore, since the sequence certainly increases without bound, and begins with the first non-square number $a(1)=2$, it must hit all non-square numbers.

M W
  • 9,866
  • 1
    Strictly speaking, this only proves that the sequence gives every non-square number starting at some minimum value. In order to verify that it gives every non-square number, you also need to show that $a(1) = 2$ is the smallest non-square number. – tparker Oct 07 '23 at 13:03
  • 1
    @tparker touché. – M W Oct 07 '23 at 13:04