My impression is that this number does not exist.
Effectively, you only need to take a look at i=50 , because i * i % 100 cyclical with a period of exactly 50. Thus, the range of numbers is not the problem you are facing.
All ideal squares that have an odd number at the end of their last position end in 6 (16, 36, 196, 256, 576, etc.), which is not odd. The problem has no solution. There is no perfect square ending with two odd numbers.
The reason for this loop is that any number can be expressed as
n = a * 50 + b , with 0 <= b < 50. In fact, by definition b = n % 50
And then,
n^2 % 100 = ( a*50 + b )^2 % 100 = ( (a*50)^2 + 2*b*a*50 + b^2 ) % 100 = ( a*a*2500 + b*a*100 + b^2 ) % 100 = b^2 % 100 = ( n % 50 )^2 % 100
In other words, the two final digits n^2 will be the same as for b^2 , where 0 <= b <50, in particular, b = n% 50.
In fact, you do not even need to go to 49, but only 25, like:
( 50 - i )^2 % 100 = ( 50^2 - 2*50*i + i^2 ) % 100 = ( 2500 - 100*i + i^2 ) % 100 = i^2 % 100
In other words
50^2 %100 = (50- 0)^2 %100 = 0^2 %100 = 0 49^2 %100 = (50- 1)^2 %100 = 1^2 %100 = 1 48^2 %100 = (50- 2)^2 %100 = 2^2 %100 = 4 ... 27^2 %100 = (50-23)^2 %100 = 23^2 %100 = 29 26^2 %100 = (50-24)^2 %100 = 24^2 %100 = 76 25^2 %100 = (50-25)^2 %100 = 25^2 %100 = 25