Post Reply 
Playing with numbers: Balanced Pandigits
07-09-2016, 10:54 AM
Post: #2
RE: Playing with numbers: Balanced Pandigits
(07-07-2016 04:40 PM)Joe Horn Wrote:  I know this is not a Number Theory forum, but I see that many of you have played extensively with pandigital numbers (hereafter referred to as pandigits), so I'm hoping you can help me with a pandigit puzzler.

Let's call "balanced pandigits" the set of pandigits which are exactly 10n digits long AND which have each digit (0 through 9) occur exactly n times. The order of the digits doesn't matter; only the count of each must be the same. E.g. 77412551806806934392 is a balanced pandigit because it contains each digit (0 through 9) exactly twice. (As usual, leading zeros are not allowed).

I hypothesized that balanced pandigits which were an exact power of an integer would be rare, so I set about looking for the smallest one. But a brute-force search found NO balanced pandigits at all. I'm using UBASIC to raise x to powers as high as it could go before overflowing (very high!), with x starting at 2 and now it's above 30000. I'm mystified. (Maybe I'll try the HP Prime emulator and see if it's faster than UBASIC.)

So my question is: Is it provable that no power of x (where x<1023456789 of course) can yield a balanced pandigit? If not, ARE there any?

Thanks in advance!

EDIT: OH GOOD GRIEF! Immediately after posting the above, the UBASIC program beeped and output 32043^2 = 1026753849. So... never mind! <blush>

The range of numbers can be optimized a little, if you are looking only for 10-digit numbers, you know for sure log10(x^a) is between 9 and 10. This means:
a) a can only go from 2 to 9 (which would yield a single-digit x).
b) for each a, you can determine the range of x. For a=2, 9/2=4.5 and 10/2=5, so xmin=10^4.5=31623 and xmax=10^5=100000, so your loop could start from 31623 (would've found the 32043 much faster). As a becomes larger, the range of x is much narrower which would speed up your search a lot.

I'll give it a try if I have time, perhaps we can find a 20-digit one.
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Playing with numbers: Balanced Pandigits - Claudio L. - 07-09-2016 10:54 AM



User(s) browsing this thread: 1 Guest(s)