Expressions for rational approximations to square roots of integers using Pell's equation