6. Find the greatest common divisor
(i) $(2 t+1,2 t-1)$;
(ii) $(2 n, 2(n+1))$;
(iii) $(k n, k(n+2))$;
(iv) $\left(n-1, n^{2}+n+1\right)$.
6. (i) $(2 t+1,2 t-1)=(2 t+1,-2)=(1,-2)=1$.
(ii) $(2 n, 2(n+1))=(2 n, 2)=2$.
(iii) $(k n, k(n+2))=(k n, 2 k)$. When $n=2 a$, $(k n, 2 k)=(2 a k, 2 k)=2 k$; when $n=2 a+1$, $(k n, 2 k)=(2 a k+k, 2 k)=(k, 2 k)=k$.
(iv) $\left(n-1, n^{2}+n+1\right)=(n-1,2 n+1)=(n-1,3)=3$, when $n=3 k+1 ;=1$, when $n=3 k-1,3 k$.