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

Home > Numbers
The digits and square numbers (Posted on 2006-10-12) Difficulty: 3 of 5
All the nine digits are arranged here so as to form four square numbers.

9, 81, 324, 576

Which is the single smallest possible square number and a single largest possible square number using all the 9 digits exactly once?

What are the possible two, three & four number sets that follow this logic?

No Solution Yet Submitted by Salil    
No Rating

Comments: ( Back to comment list | You must be logged in to post comments.)
Solution Excel-aid | Comment 3 of 4 |

I'm not practical with programming (as Charlie), so I try to solve with Excel in four steps. 

1) Open an Excel sheet. Fill column A with all the numbers from 11000 to 31622 (do it with Excel Fill Series feature). 

2) Fill column B with the squares (Use the Power function of Excel for the first cell B1 and fill the formula down (it's very quick) since the row 21622 is reached.

3) Now there are all the squares in the sheet from (B1=121000000 to B21622=999950884). The problem is finding those containing just all different digits. One way to do this is using the Substitute Function:

Substitute( text, old_text, new_text, nth_appearance )

Substitute(B1,1,a,1) convert "121000000" to "a21000000"

Substitute(B1,2,a,1) convert "a21000000" to "aa1000000"

(Note that the bold 1 means that only the first appearence of the digit in the number is substituted)

If we applies Substitute nine times (and put the output in column C, D, …to K), one for each "1 to 9 number" (and filling the formula down till the end of the file) we'll obtain a pattern for each square number. But:

- the pattern of numbers with different digits (and only these) will be "aaaaaaaaa".

4) To find these numbers (whose pattern is "aaaaaaaaa") we can use the function "If" (output column L):

-If(L1=aaaaaaaaa; Yes;""). Filling it down you obtain exactly 30 "Yes" in the rows of the numbers we wanted to find. They are the 30 square 9-digited numbers formed with 9 different digits.

Edited on November 8, 2006, 9:19 am
  Posted by armando on 2006-11-08 09:13:50

Please log in:
Login:
Password:
Remember me:
Sign up! | Forgot password


Search:
Search body:
Forums (0)
Newest Problems
Random Problem
FAQ | About This Site
Site Statistics
New Comments (14)
Unsolved Problems
Top Rated Problems
This month's top
Most Commented On

Chatterbox:
Copyright © 2002 - 2024 by Animus Pactum Consulting. All rights reserved. Privacy Information