My
meager attempt
to disprove
Beal's Conjecture


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

http://www.inquisitr.com/691846/beal-conjecture-solution-worth-1-million/
http://www.businessinsider.com/beale-conjecture-1-million-dollar-prize-2013-6
http://www.redorbit.com/news/science/1112866771/beals-conjecture-solution-million-dollar-prize-060613/

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: 

If

A
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:


97349998850241953505669500590078964079996643867759909835628238948416395328441361775094020628778109798
22512803446305744622547662597855213726177218355912147375874318456473844143948348217482732591413901227
34645049781415128611941303200742144350197854695415295412356864701650344007015946790292596208051145915
64151571607260759155245905339825829287251100630987449578271073741873451023069990463849189158284017422
35778849828173912080906894975095781582779759040806258841284608211324673140050725514126713450921070943
53785839074480838665294061533839600030867841093500838649093941617749973153831293274361866951980160578
52184703505219262825400180236755192262229135027837790078736871410893230404871273239054348720556523969
92192017002829047043424096808038328275117102200905921214013189543931640924253120533423692472723980243
17952546271200443358778989118382181442709383693856595143487329675345376540406124206689765147081377111
51684461718319405152569623017617007894387657681860551237218383552398353189019396523080834134366477251
08726540384415830263724707034020268217260363564658497101927613031388272354595100678484742300267352894
20134860278204401011854886845891212689212463940308736911002561729478597854630698759931090188292311103
40866694164554379231248251897709788330370216389272282812823521746036253246597387404249260132669675743
59450219224372627307894189554020069732366450398670012977845173498909961490298055490211437861503325160
72193444328110920828547961790040613258689144687248228225634087132740445805327595236447928286840157292
88581920533564556695814408002864077446023411521981201581092395310905738939961007105893661814362033843
09282398091230149715861527501627716290667840531104039827108159939149505079096649252842387772489659313
31422800790940357902440671155462668908628015363196437845270251807067287364973639016807798397429830921
66339458219002269432743534599350862148146366557064425599948174956486971293042569143781843905548816664
25134568549290760981519256654085776908903308760942873965783232929269059079534712168898483187402422828
51249561313889096572674047536572780299195158748430672669797352185698883372103744388702516718631787857
00183838886295710275898921113948925194182709746145486703166289113014993571823915981865057633099918690
17925979670025536668773791777460248254508385843571452544688832969870120392737800427525879279035680689
77703264199948797611429902966063823178016698338175984957735308959446345925243922228529263084658846284
13309367848971139496769104393863125889192752364740900346540711968453987402970663112200337286411384860
74213228017269391822839336098319439224223451261787460181263592615323888690971094821831501456967249944
15960981340764999090440070391802300835735021160453224707580639530389266553725740148285496345083868512
63773551901448909922207944299063267572280087485556537089142801614167808732726238113697071156521603272
21977773846568965448281733345317494080754273649825179129592773994480660570910435918830290614091843983
09810507987204979305445818642783690950929823213016774934532100029234982454851400975403095843630571056
73635965321555842294297012321095646138639666730540705613576694518893190405629220735753279807714212459
448261831101068420826161867


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:

http://www.javascripter.net/math/calculators/100digitbigintcalculator.htm

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