Results 1 to 9 of 9

Math Help - Pandigital numbers (squares)

  1. #1
    Newbie
    Joined
    Dec 2009
    Posts
    15

    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. 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.

    Just a few tips, please! Thanks in advance.

    P.S. Sorry for eventually bad English. It's not my native language.
    Follow Math Help Forum on Facebook and Google+

  2. #2
    MHF Contributor
    Joined
    Dec 2007
    From
    Ottawa, Canada
    Posts
    3,102
    Thanks
    68
    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?
    Follow Math Help Forum on Facebook and Google+

  3. #3
    Super Member

    Joined
    May 2006
    From
    Lexington, MA (USA)
    Posts
    11,740
    Thanks
    645
    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. 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.

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

    Follow Math Help Forum on Facebook and Google+

  4. #4
    Newbie
    Joined
    Dec 2009
    Posts
    15
    Quote Originally Posted by Wilmer View Post
    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.
    Follow Math Help Forum on Facebook and Google+

  5. #5
    MHF Contributor
    Joined
    Dec 2007
    From
    Ottawa, Canada
    Posts
    3,102
    Thanks
    68
    87 is correct.

    Wonder where Soroban got only 10...
    Follow Math Help Forum on Facebook and Google+

  6. #6
    Super Member
    Joined
    Mar 2008
    Posts
    934
    Thanks
    33
    Awards
    1
    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). :-(
    Follow Math Help Forum on Facebook and Google+

  7. #7
    MHF Contributor

    Joined
    Apr 2005
    Posts
    15,725
    Thanks
    1478
    Quote Originally Posted by Dr. Jekyll View Post
    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. 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.

    Just a few tips, please! Thanks in advance.

    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.
    (Your English is excellent.)
    Follow Math Help Forum on Facebook and Google+

  8. #8
    Super Member Bacterius's Avatar
    Joined
    Nov 2009
    From
    Wellington
    Posts
    927
    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.
    Follow Math Help Forum on Facebook and Google+

  9. #9
    Newbie
    Joined
    Dec 2009
    Posts
    15
    Here's the list of the numbers I was looking for. Of course, it's computer generated.

    Thanks again for all your replies.
    Attached Files Attached Files
    Follow Math Help Forum on Facebook and Google+

Similar Math Help Forum Discussions

  1. Replies: 2
    Last Post: November 4th 2010, 10:13 AM
  2. Replies: 2
    Last Post: December 21st 2009, 07:39 PM
  3. Sum of squares of even numbers
    Posted in the Discrete Math Forum
    Replies: 2
    Last Post: November 27th 2009, 04:22 PM
  4. Replies: 4
    Last Post: November 13th 2009, 05:12 PM
  5. Replies: 1
    Last Post: April 13th 2009, 12:15 AM

Search Tags


/mathhelpforum @mathhelpforum