meager attempt
to disprove
Beal's Conjecture

Edward D. Collins

Graphic by Bill Price


Earlier this week a co-worker (thanks Chris) brought to my attention a story that is currently making the headlines.

D. Andrew "Andy" Beal has increased the prize fund on his standing offer.  He will now pay $1,000,000.00 to the person that proves, or disproves, his conjecture, now known as Beal's Conjecture.

Beal's original offer, back in 1993, was $5,000.00.  Four years later the prize was raised to $10,000.00 and then later it was increased again to $100,000.00.  His latest offer is a cool million.

His conjecture is this: 


x + By = Cz

where A, B, C, x, y, and z are positive integers with x, y, z > 2,
then A, B, and C have a common prime factor.


Another way of stating it, which I happen to prefer, is this: 

The equation

Ax + By = Cz

is not possible where variables A
&B, A&C, & B&C
are co-prime integers and x, y, z > 2


Co-prime?  What the heck is that?  We all know what prime numbers are, but I had to look up what a co-prime number was!

As it turned out, I later discovered I was already familiar with Andy Beal, and I didn't know it or remember.  Andy is "The Banker" in the wonderful book, The Professor, the Banker, and the Suicide King, which is a part of my poker book collection.

There is no way I could prove the conjecture - I'm not that type of a math guy.  It would be easier for me to disprove it.  If Andy believes the equation is not possible, I could disprove it simply by finding a valid equation that fit the conditions!

Since I've been having a bunch of fun over the past six months or so writing programs Visual Basic Applications via Excel, I thought I'd take a stab at it using Excel.  And although I didn't seriously expect to find a solution, I thought it would be a good way to further familiarize myself wtih VBA.


As it turned out, the program didn't take long to write.  In fact, the bulk of the program only consists of a few dozen lines of code.  I think I had the program working after just an hour or so.  But over the next few days I spent time testing it, debugging it, enhancing the somewhat simple user interface, and attempting to make the program more efficient.

After writing it, I discovered many others have written their own such programs (which didn't surprise me in the least), in a variety of different coding languages, that do the very same thing... attempt to find a single counter-example that would immediately disprove the entire conjecture.

Of course, before writing the program, I knew I had to figure out a way to overcome one major obstacle... that I'd be dealing with VERY large integers and Excel, with all of its wonderful features, can't normally handle and display numbers with more than 16 significant digits!

Many years ago I wrote a program that could add and multiply numbers of virtually any length - by turning the "numeric variable" into a "string variable."  (The end result "looks" like a number and for all practically appearances to the user IS a number, but it actually represented as a string variable.)  Fortunately, I found an Excel add-in that does this very thing and this saved me some time.  The add-in saved me from having to re-write this numeric to string subroutine conversion all over again.

Here's a screenshot of the latest version of my program:

With the Excel add-in I downloaded and installed, the program is now capable of working with very large numbers.  For example, 15,627 to the 753 power is this:


This number is exactly 3,158 digits long! 

How do we know this is correct?  Well, you can double-check it with one of the many online arbitrary precision calculators that are available.  Here's a link to one such calculator:

Both my Excel program and this online Javascript calculator find the identical result instantly!

654,321 ^ 789 ?   This result is 4,589 digits long!

1,024,607,322,116,063,012 ^ 575  ?  This result is 10,357 digits long!!

58,932 ^ 4,690 ?   This result is 22,373 digits long!!!

1,045,678,945 ^ 3,168 ?  This result is 28,574 digits long!!!!

Suffice to say, arbitrary calculators can be lots of fun!


Anyway, my program is capable of generating integers, determining if the bases are are co-prime, plugging everything into the equation, and examining the results.  It, of course, can run unattended in batch mode.  I can, for example, run it while I'm sleeping or away at work.  The user sets the min and maximum values that he/she would like to test (the A, B, C bases and the x, y, z exponents), clicks a button, and the program takes over from there.

Currently, it doesn't sound like it's quite as fast as similar programs that I've read about, (and part of that reason is Excel isn't as fast as other languages) but I'm working on improving the speed.  (Modifying / enhancing the program is part of the fun!  If I really wanted the fastest program possible, what I should do is convert the code over to PowerBASIC, a language which can run circles around most all other languages, including Visual Basic.  But for now I'm happy with having it as a VB application... I still having fun learning the syntax of VB.)

If the program stumbles upon a valid equation, it will (a) immediately save the solution to my hard drive (in case the power were to suddenly go out or something),  send me text message to my phone and display a message box with the following message: 

"I can't freakin' believe it!  Are you kidding me?  I found a solution!  I'm a millionaire!"

I'll need some luck if I ever wish to see that message.  :)