All about flooble | fun stuff | Get a free chatterbox | Free JavaScript | Avatars
 perplexus dot info

 444...444 (Posted on 2019-08-02)
Find the smallest perfect square whose decimal representation begins and ends with three 4's.

 No Solution Yet Submitted by Danish Ahmed Khan No Rating

Comments: ( Back to comment list | You must be logged in to post comments.)
 computer solution | Comment 2 of 5 |
The smallest is 444171597444, with square root 666462.

Here are the first few, with their square roots:

` 444171597444  666462 444272905444  666538 444838309444  666962 444939693444  6670384441396081444 21074624441716421444 21075384443503793444 21079624443824209444 21080384445612005444 21084624445932497444 21085384447720717444 21089624448041285444 21090384449829929444 2109462`

Note that the for...next loop used digits starting at the second  one in, for example 10001 to 20000 for 4-digit center fill. That way any zero(s) immediately after the initial 444 would be checked; none happened to be found, though.

For l = 1 To 7
st = Int(10 ^ l + 1.5): fin = 2 * Int(10 ^ l + 0.5)
For m = st To fin
v = Val("444" + Mid(LTrim(Str(m)), 2) + "444")
sr = Int(Sqr(v) + 0.5)
If sr * sr = v Then
Text1.Text = Text1.Text & v & Str(sr) & crlf
End If
DoEvents
Next
Next

Expanding to an 8-digit inner fill does lead to four that have a zero right after the initial 444:

`44401725825444 666346244402738677444 666353844408389537444 666396244409402465444 666403844415053749444 666446244416066753444 666453844421718461444 666496244422731541444 666503844428383673444 666546244429396829444 666553844435049385444 666596244436062617444 666603844441715597444 666646244442728905444 666653844448382309444 666696244449395693444 666703844455049521444 666746244456062981444 666753844461717233444 666796244462730769444 666803844468385445444 666846244469399057444 666853844475054157444 666896244476067845444 666903844481723369444 666946244482737133444 666953844488393081444 666996244489406921444 667003844495063293444 667046244496077209444 6670538`

 Posted by Charlie on 2019-08-02 13:36:38

 Search: Search body:
Forums (1)