$GCD(n^2+1,n+1)$, $n\in \mathbb{N}$
What I did: $n^2+1=(n-1)(n+1) + 0$
So I thought $(n^2+1:n+1)=n+1$
But that doesn't seem to be the case: $n=2$
$n^2+1=5$
$n+1=3$
$GCD(5,3)=1$
Why is the GCD here $n-1$?
E: I just realized (thanks to a comment) I made a mistake, as $n^2+1\neq(n+1)(n-1)$.
Edit2: I'm sorry guys, I don't understand most of your answers. We haven't yet studied things like the floor function in my class. I know a bit of mod arithmetic and euclid's algorithm.