$ 0=1 $ ? Where is the mistake? I just found this formula although it can be easily derived.
Let $ n $ be any integer then,
$$n=\sqrt{n^2-n+\sqrt{n^2-n+.....}}$$
So if I plug in $ 0 $ in this equation I get,
$$0=\sqrt{0-0+\sqrt{0-0+....}}$$

$$0=\sqrt{0+\sqrt{0+\sqrt{0+....}}}$$—————->1

But if I plug in $1$ in the equation I get,
$$1=\sqrt{1^{2}-1+\sqrt{1^{2}-1+.....}}$$

$$1=\sqrt{0+\sqrt{0+\sqrt{0+....}}}$$,—————->2

Which gives me that 0=1.Where is the mistake?
Edit:
Equation 1 can also be derived by the following method
$$1=\sqrt{0+\sqrt{1}}$$
$$1=\sqrt{0+\sqrt{0+\sqrt{1}}}$$
.
.
.
$$1=\sqrt{0+\sqrt{0+\sqrt{0+....}}}$$
Ok so let me tell you how I derived it.
I came across this particular expression,
$$x=\sqrt{1+\sqrt{1+\sqrt{1+.....}}}$$ which actually gives me the golden ratio,
So I chose n to be an integer and let x be the value of the following expression,
$$x=\sqrt{n+\sqrt{n+\sqrt{n+...}}}$$.
After solving for x you get it’s value to be!
$$x=\frac{1+\sqrt{1+4n}}{2}$$
(I took a positive sign since x is greater than or equal to 0)
So x can be an integer whenever n=0,2,6,10,20.....
When n=2,x=2(since x>0) and we get,
$$2=\sqrt{2+\sqrt{2+......}}$$
Similarly for n=6,x=3,
$$3=\sqrt{6+\sqrt{6+......}}$$
So x is an integer whenever $$n=k^{2}-k$$ where k is a non-negative integer.Substituting $$n=k^{2}-k$$ you get x=k.
After all this I get,

$$n=\sqrt{n^2-n+\sqrt{n^2-n+.....}}$$

 A: You claim the equation $$n=\sqrt{n^2-n+\sqrt{n^2-n+.....}}$$ can be easily proved/derived. Can you provide the proof/derivation?
The proof/derivation should consist of two parts:


*

*A strict definition of what $\sqrt{n^2-n+\sqrt{n^2-n+.....}}$ means

*A strict proof that, using the definition of $\sqrt{n^2-n+\sqrt{n^2-n+.....}}$, it is equal to $n$.

A: The problem arises because you didn't really defined the radical expression
$$\sqrt{n^2-n+\sqrt{n^2-n+\sqrt{n^2-n+\cdots}}}.$$
Let us rewrite it as the recurrence
$$a_{k+1}=\sqrt{n^2-n+a_k}.$$
Then with $n=0$ or $1$,
$$a_{k+1}=\sqrt{a_k}=\sqrt[4]{a_{k-1}}=\cdots\sqrt[2^{k+1}]{a_0}.$$
For $a_0=0$, we have the limit $a_\infty=0$, and for $a_0>0$, $a_\infty=1$, so you could indeed assign the expression the value $0$ or $1$, and the equation
$$n=\sqrt{n^2-n+\sqrt{n^2-n+\sqrt{n^2-n+\cdots}}}$$ may hold or not depending on the value of $a_0$.

In other words, the truth is that you should write
$$0=\sqrt{0^{2}-0+\sqrt{0^{2}-0+\sqrt{0^{2}-0+\cdots0}}}$$
$$1=\sqrt{1^{2}-1+\sqrt{1^{2}-1+\sqrt{1^{2}-1+\cdots1}}}$$
while you innocently assumed
$$1=\sqrt{1^{2}-1+\sqrt{1^{2}-1+\sqrt{1^{2}-1+\cdots\color{red}0}}}.$$

For other $n$, if there is convergence, we have
$$a(a-1)=n(n-1)$$ and
$$a=\frac{1\pm|1-2n|}2.$$
For $n>1$, the only positive possibility is $a=n$. Otherwise, there could be two solutions, presumably depending on the initial value. But you can't spare convergence analysis.
A: Assuming convergence:
$$a=\sqrt{n^2-n+\sqrt{n^2-n+.....}}$$
$$a=\sqrt{n^2-n+a}$$
$$a^2=n^2-n+a$$
$$a^2-a=n^2-n$$
$$a(a-1)=n(n-1)$$
For the case $n=1$:
$$a(a-1)=0$$
Notice that $a$ has roots $1$ and $0$. Why did you assume $a$ to be one of them, $1$? All $a$ that satisfies $a=\sqrt{n^2-n+a}$ and is positive is correct.
A: As most have been doing, assuming convergence, let,
$$k=\sqrt{n^2-n+\sqrt{n^2-n+\cdots}}$$
Squaring both sides,
$$k^2=n^2-n+\sqrt{n^2-n+\cdots}$$
$$k^2=n^2-n+k$$
$$k^2-k-(n^2-n) = 0$$
$$k=\frac{1\pm\sqrt{4n^2-4n+1}}{2}$$
$$k=\frac{1\pm(2n-1)}{2}$$
$$k={n,1-n}$$
Now, we have to be careful. Squaring produced extra solutions. So, we must verify which ones are right for what domains.  
Clearly, $\forall n<0, 1-n$ is the candidate and $\forall n>1, n$ is the answer.  
For $n=0, k$ is trivially 0.
Finally, for $n=1, k=1-n$ as you have verified.
In a summary,
$$k=$$ \begin{cases} 
      1-n & n< 0,n=1 \\
      n & 1< n,n=0\\
   \end{cases}
P.S. I'm not sure if this is correct. I would be glad if someone could verify this.
