Project Euler 57 - Square root convergent

Official link: https://projecteuler.net/problem=57

Thought Process

We can build recurrence relations for the numerator and denominator as follows

If you're in math, prove the recurrence relation using Induction!

Now that we can very quickly calculate the numerator and denominator at each iteration, just check if numerator is longer than the denominator

Interactive Code

Input an integer (yourinput)

Code will output the number of times the numerator has more digits than the numerator in the first yourinput iterations