1. ## Perfect Squares

Which are the lowest and highest nine digit perfect squares that include all the numbers from one to nine without the repetition of any number?

2. ## Re: Perfect Squares

Originally Posted by PASCALfan
Which are the lowest and highest nine digit perfect squares that include all the numbers from one to nine without the repetition of any number?
My first suggestion for you is:

Look for numbers divisible by 9.

3. ## Re: Perfect Squares

Every nine digit number composed of all the digits from 1 through 9, is divisible by 9, so that's not much help. -- except that the square root of the number must be divisible by 3.

Look at the result of squaring each of the digits 1 through 9, -- particularly look at the one's digit of the result. -- the ten's digit may be handy as well.

What is the range of the numbers whose squares have nine digits? Narrow that down a bit, to numbers between the square root of 123456789 ≈ 11112, and the square root of 987654321 ≈ 31428 .

4. ## Re: Perfect Squares

Originally Posted by PASCALfan
Which are the lowest and highest nine digit perfect squares that include all the numbers from one to nine without the repetition of any number?
There's 30 of them. WHY do you need this?

5. ## Re: Perfect Squares

Here's one of them: 14676^2 = 215384976 .

6. ## Re: Perfect Squares

Highest is 923187456

7. ## Re: Perfect Squares

Originally Posted by PASCALfan
Which are the lowest and highest nine digit perfect squares that include all the numbers from one to nine without the repetition of any number?
This is one of my favorite problems, and you have already been given some excellent advice. I have written computer programs to find all 30 solutions (in many languages-- as I said, the problem is a favorite of mine).

The problem dates back at least to "Amusements in Mathematics" by H.D. Dudeney, first published in 1917. Like you, Dudeney asked for the largest and smallest squares, and he gives the answers in the book. Obviously he did not use a computer in 1917. I wish I knew how he got the answers, but I don't. The solution in the book simply gives the two numbers with no hint of how they were derived. I think Dudeney knew at least the "casting out nines" property, which is enough to conclude that each square is divisible by 9, but my impression of him is that he did not know much more in the way of number theory. I could be wrong about that, of course.

In my first brief introduction to number theory, many years ago, my instructor mentioned this problem and pointed out the nines business. He said that he had solved the problem completely, finding all 30 solutions "by hand", and that his method involved just a little more number theory than we knew at the time. I have often wondered since then just what bit of number theory he had in mind, but I have never figured that out. If anyone has any ideas along those lines, I wish they would post them.

8. ## Re: Perfect Squares

Hello,

Thanks for the results, How is this derived?? thats what I am also looking for..

9. ## Re: Perfect Squares

Originally Posted by PASCALfan
Hello,

Thanks for the results, How is this derived?? thats what I am also looking for..
What have you tried?

This is going to involve some trial and error and systematic search. You have to find methods of reducing the size of the search space.

CB

10. ## Re: Perfect Squares

I am using trial and error method on all combinations. But something in my mind says there could be an easier method, b'coz of the special number 9. I am looking for it

11. ## Re: Perfect Squares

Originally Posted by PASCALfan
I am using trial and error method on all combinations. But something in my mind says there could be an easier method, b'coz of the special number 9. I am looking for it
What have you done to reduce the search space?

CB

12. ## Re: Perfect Squares

A perfect square can end only in 1, 4, 5, 6 and 9

13. ## Re: Perfect Squares

Finally got them

lowest 139854276 = 11826 ^2

Highest 923187456 = 30384 ^2

14. ## Re: Perfect Squares

Originally Posted by PASCALfan
A perfect square can end only in 1, 4, 5, 6 and 9
The ideas that reduce the size of search space are:

You are searching the squares of the numbers in the range ceiling(sqrt(123456789) to floor((sqrt(987654321)) also these roots should be divisible by 3, these reduce the number of possibilities to ~6800.

Maybe someone can suggest other means of reducing the search space size.

CB

15. ## Re: Perfect Squares

I prefer sticking digits together to taking a number apart (even if it takes a little longer);
keeping last digit at 1,4,5,6,9 and looping others such that none of the 9 are the same:
201600 "examinations" required (5 * 8!), taking 4 seconds (using UBasic).

Page 1 of 2 12 Last