How to show this fraction is not an integer Suppose $k\geq 2$ is an integer. I want to show $$\frac{1+k+k(k-2)}{1+\frac{k-1}{k}+\frac{(-1-\sqrt{k-1} )^2}{k(k-2)}}$$ is not an integer. It is equal to $$\frac{(k-2) k (k^2-k+1)}{2 (k^2-2 k+\sqrt{k-1}+1)}.$$
If I can show this then I will be able to finish my proof of the Friendship Theorem. We may assume $k$ is even if that helps any.
 A: Hint: For that number to be rational it is necessary that the square root is rational, which happens only when $k=n^2+1$ for some integer $n$. Show that then the denominator (of the latter formula) is divisible $n$ but the numerator is not leaves remainder $-1$ when divided by $n$. Therefore the factors of $n$ cannot cancel. Check $n=1$ separately.
A: It is a special case of the following
Theorem $\ $ Suppose $\,f,g\in \Bbb Z[x]\,$ are polynomials, and $\,j\neq 0\,$ and $\,k,a\,$ are all integers.
If $\,\color{#c00}{f(a)=\pm1},\ \color{#0a0}{g(a) = 0}\ $ then $\,\dfrac{f(k)}{g(k)+ j\,\sqrt{k-a}} = i\in\Bbb Z$ $\ \Rightarrow\ $ $ k = 1\!+\!a\ $ or $\ f(k) = 0$
Proof $\ $ Clearing denom's we get $\, f(k)-ig(k) =\, ij \sqrt{k-a}.\ $ If $\,f(k)\neq 0\,$ then $\,i\neq 0\,$ therefore upon dividing by $\,ij\neq 0\,$ we deduce that $\,\sqrt{k-a}\in\Bbb Q.\,$ By the Rational Root Test we infer $\,\sqrt{k-a} = n\in\Bbb Z,\,$ so $\, k = n^2+a.\ $ If $\,n> 1\,$ then substituting this into the fraction
$$\dfrac{f(n^2+a)}{g(n^2+a)+ jn}\in\Bbb Z\qquad $$
$\qquad n\,\nmid f(n^2+a)\ $ since $\,\ {\rm mod}\ n\!:\,\ n\equiv 0\,\Rightarrow\,f(n^2+a)\equiv \color{#c00}{f(a)\equiv \pm1 \not \equiv 0}$
$\qquad n\,\mid g(n^2+a)\ $ since $\,\ {\rm mod}\ n\!:\,\ n\equiv 0\,\Rightarrow\,g(n^2+a)\equiv \color{#0a0}{g(a)\equiv 0}$
so $\,n>1\,$ divides the denominator but not the numerator, contra the fraction is an integer. Therefore $\,n = 1\,$ hence $\,k = n^2+a = 1+a.$
