If G(n) = gcd(S(n), S(n+1)), then it divides their difference, which is simply (2n+1).
So, in the example given, (n^2+100)/(2n+1) is an integer.
Generalising: (n^2+k)/(2n+1) must also be an integer.
We can always make the substitution: ((2k)^2+k)/(2*(2k)+1) to return the integer, k. Since in the example given, k=100, the prime 401 must divide all solutions {S(n), S(n+1)}