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 \(x\). And I found something! Here is what I ended up with:

\(\left\lceil { 10 }^{ n }\sqrt { x } \right\rceil \)

So, for a given \(x\), it would output a number you'd have to square to get a perfect square starting with \(x\).

**For example:**

*Perfect squares starting with 8888:*

\( \left\lceil { 10 }^{ 2 }\sqrt { 8888 } \right\rceil =9428\quad ({ 9428 }^{ 2 }=88887184)\\ \left\lceil { 10 }^{ 3 }\sqrt { 8888 } \right\rceil =94277\quad ({ 94277 }^{ 2 }=8888152729)\\ \left\lceil { 10 }^{ 4 }\sqrt { 8888 } \right\rceil =942762\quad ({ 942762 }^{ 2 }=88880018864)\\ \)

(so on, n would increase by 1 each time...)

*Perfect squares starting with 987654321:*

\( \left\lceil { 10 }^{ 5 }\sqrt { 987654321 } \right\rceil =3142696806\quad ({ 3142696806 }^{ 2 }=9876543214442601636)\\ \left\lceil { 10 }^{ 6 }\sqrt { 987654321 } \right\rceil =31426968053\quad ({ 31426968053 }^{ 2 }=987654321004282610809) \)

(so on...)

My question is this: See the \(x\) 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!

## Comments

Sort by:

TopNewestHave you read the solution to the problem? it should be pretty clear that I'm not just randomly testing for the value of \(n\). – Calvin Lin Staff · 10 months, 2 weeks ago

Log in to reply

– Andrew Tawfeek · 10 months, 2 weeks ago

I understood slightly the differences between when (referring to the solution there) N is odd/even how it would affect the value of \(n\), but I can't seem to understand what decides the lowest value of \(n\).Log in to reply

– Calvin Lin Staff · 10 months, 2 weeks ago

Moving this into the solution discussion of the problem directly.Log in to reply