# A problem with functions defined on positive integers.

Where [x] denotes the greatest integer number, which does not exceed x.

I need some help please. The proof should also be at high school level. Please don’t use hard or complex things.

• What does that little mark on the start of the last line mean? – fleablood Dec 13 '18 at 18:09
• I guess "prove that" – Federico Dec 13 '18 at 18:09
• Experimenting, it seems that $f(2^k+k-2)=2^{k-1}$ – Federico Dec 13 '18 at 18:10
• Yeah. It means prove that – furfur Dec 13 '18 at 18:15
• The answer says that f(2^k + k - 2)=(2^(k -1))^2 – furfur Dec 13 '18 at 18:17

Hint. Show that if $$f(n)=N^2$$ then for $$0\leq k\leq N$$ \begin{align} &f(n+2k+1)=(N+k)^2+N-k, &\lfloor\sqrt{f(n+2k+1)}\rfloor=N+k,\\ &f(n+2k+2)=(N+k)^2+2N, &\lfloor\sqrt{f(n+2k+2)}\rfloor=N+k. \end{align} Therefore, in this range, we have a perfect square only for $$k=N$$, i.e. $$f(n+2N+1)=(2N)^2$$. Hence $$f(1)=1^2\to f(4)=2^2\to f(9)=4^2\to f(18)=8^2\to f(35)=16^2.$$ We may conclude that $$f(n)$$ is a perfect square if $$n$$ belongs to the sequence $$(n_k)_{k\geq 1}=1,4,9,18,35,\dots$$ , that is $$n_k=2^k+k-2$$.