# Given $a+b^2=n$, compute the value of $b$

Given a positive number $$a$$, its decimal part is $$b$$, $$a+b^2=n$$, $$n$$ is a positive interger, compute the value of $$b$$.

My attempt:

$$0

I want to find the range of $$a+b^2$$

• Your question should be clear without the title. After the title has drawn someone's attention to the question by giving a good description, its purpose is done. The title is not the first sentence of your question, so make sure that the question body does not rely on specific information in the title. – Martin R Jul 20 '19 at 16:00
• How it can be? Do you claim that $b+b^2=$ equal a whole number? – Moti Jul 20 '19 at 16:17

This is equivalent to $$a+b^2=\lfloor a\rfloor+b+b^2\in\mathbb{N}$$ Hence we need $$b+b^2\in\mathbb{N}$$. For $$0\lt b\lt1$$ we have that $$0\lt b+b^2\lt2$$ Hence the only possible integer solution is $$b+b^2=1$$ $$b^2+b-1=0$$ $$\therefore b=\frac{-1+\sqrt{5}}{2}\approx0.618033988749894\dots$$ giving only one solution as $$0\lt b \lt1$$.
Since $$a-b$$ is integer, you get $$b^2+b=n-a+b$$, so $$b^2+b$$ is an integer.