Hey guys! I was pretty bored today and I happened to have my calculator on me. And for some reason, this problem was on my mind.
So, I started to think about how it gets solved and such and wanted to generalize some formula that could find all the squares starting with . And I found something! Here is what I ended up with:
So, for a given , it would output a number you'd have to square to get a perfect square starting with .
(so on, n would increase by 1 each time...)
My question is this: See the in that formula that I stated at the start of this and never went on to define? That's the thing, I don't know how to define it, as in without guessing and checking, I don't know the smallest n for which the result is valid. I know from playing around that n depends in some way on the amount of digits of x and the parity of the x. If x is even, the smallest n for which the formula is correct will be even (vice versa for odd). Also, the larger x is, the larger n seems to have to be in order for it to hold.
I've tried many things but I can't seem to find out how to determine the smallest value n needed for the formula to carry out properly.
Could anyone provide some insight? It would be much appreciated. :)
This is just for fun!