1. ## Pandigital numbers (squares)

Hello everybody!

I need a little help with my homework. I need to find all (natural) numbers whose squares are pandigital numbers (they use each of the digits 0,1,...,9 only once), e.g. $\displaystyle 71433^2=5102673489$.

Since that would take ages to do manually, I made a small program in Mathematica which finds all such numbers. Now, I would like to know if there is some "more mathematical" way to do this or is it simply the work for computers.

P.S. Sorry for eventually bad English. It's not my native language.

2. Can only think of the search program being restricted to
ceiling[sqrt(1023456789)] = 31992 and floor[sqrt(9876543210)] = 99380;
so a looper:
loop n from 31992 to 99380
x = n^2
x's digits all different?

3. Hello, Dr. Jekyll!

I need to find all (natural) numbers whose squares are pandigital numbers
(they use each of the digits 0,1,...,9 only once), e.g. $\displaystyle 71433^2=5102673489$.

Since that would take ages to do manually, I made a small program
in Mathematica which finds all such numbers.
Now, I would like to know if there is some "more mathematical" way to do this.
I don't know of any algorithm that will help.

I did find a list of pandigital squares
. . with your example conspicuously missing.

. . $\displaystyle \begin{array}{ccc} 32043^2 \:=\:1026753849 & & 45624^2 \:=\:2081549376 \\ 32286^2 \:=\:1042385796 & & 55446^2 \:=\:3074258916 \\ 33144^2 \:=\:1098524736 && 68763^2 \:=\:4728350169 \\ 35172^2 \:=\:1237069584 && 83919^2 \:=\:7042398561 \\ 39147^2 \:=\:1532487609 && 99066^2 \:=\:9814072356\end{array}$

4. Originally Posted by Wilmer
Can only think of the search program being restricted to
ceiling[sqrt(1023456789)] = 31992 and floor[sqrt(9876543210)] = 99380;
so a looper:
loop n from 31992 to 99380
x = n^2
x's digits all different?
Well, that's exactly what I did. I'm allowed to use Mathematica (or Maple) for my homework and since Mathematica has function which counts digits I managed to find all such numbers. I also wrote a program in C which does the same thing and I think it found 87 such numbers or something like that. They all seemed correct. Maybe I'll post these numbers later.

5. 87 is correct.

Wonder where Soroban got only 10...

6. I don't know of a pencil-and-paper solution, but you can reduce the search space somewhat by observing that if x is a pandigital number then x must be divisible by 3. That is because the sum of the digits of x^2 is 0+1+2+...+9 = 45, which is divisible by 9, so x^2 is divisible by 9.

If you consider the problem where x^2 has digits 1,2,...,9 (excluding zero), there are fewer solutions, and I think I once found a reference showing that all the solutions had been found in the pre-computer era, so a pencil and paper solution must exist. But I have never seen it (or found it, despite trying). :-(

7. Originally Posted by Dr. Jekyll
Hello everybody!

I need a little help with my homework. I need to find all (natural) numbers whose squares are pandigital numbers (they use each of the digits 0,1,...,9 only once), e.g. $\displaystyle 71433^2=5102673489$.

Since that would take ages to do manually, I made a small program in Mathematica which finds all such numbers. Now, I would like to know if there is some "more mathematical" way to do this or is it simply the work for computers.

P.S. Sorry for eventually bad English. It's not my native language.
No, I don't believe there is such a method. The difficulty is that since this problem requires base 10, it not really a "mathematics" problem. It is a question really of a particular representation of numbers.

8. That's strange. Wikipedia has not got the same definition as you of pandigital numbers.

You : they use each of the digits 0,1,...,9 only once

Wiki : has among its significant digits each digit used in the base at least once

And no, I do not think that there is an easy way. But perhaps, by fiddling with moduli, you might find a way to express such 10-digit long numbers. But I haven't tried and it may not be that easy.

9. Here's the list of the numbers I was looking for. Of course, it's computer generated.

Thanks again for all your replies.