Add files via upload

This commit is contained in:
Peter Norvig 2018-04-06 14:51:43 -07:00 committed by GitHub
parent df1b323d19
commit 02a3259b4e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -11,7 +11,7 @@
} }
}, },
"source": [ "source": [
"<div style=\"text-align:right\"><b>Peter Norvig</b> 22 October 2015, revised 28 October 2015, 4 July 2017</div>\n", "<div style=\"text-align:right\"><b>Peter Norvig</b> 2000; revised 2015&mdash;2018</div>\n",
"\n", "\n",
"# Beal's Conjecture Revisited\n", "# Beal's Conjecture Revisited\n",
"\n", "\n",
@ -25,26 +25,20 @@
"made his conjecture in 1993:\n", "made his conjecture in 1993:\n",
"\n", "\n",
"> If $A^x + B^y = C^z$, \n", "> If $A^x + B^y = C^z$, \n",
"> <br>where $A, B, C, x, y, z$ are positive integers and $x, y, z$ are all greater than $2$, \n", "> <br>where $A, B, C, x, y, z$ are positive integers \n",
"> <br>and $x, y, z$ are all greater than $2$, \n",
"> <br>then $A, B$ and $C$ must have a common prime factor.\n", "> <br>then $A, B$ and $C$ must have a common prime factor.\n",
"\n", "\n",
"[Andrew Wiles](https://en.wikipedia.org/wiki/Andrew_Wiles) proved Fermat's theorem in 1995, but Beal's conjecture remains unproved, and Beal has offered [$1,000,000](http://www.ams.org/profession/prizes-awards/ams-supported/beal-prize) for a proof or disproof. I don't have the mathematical skills of Wiles, so I could never find a proof, but I can write a program to search for counterexamples. I first wrote [that program in 2000](http://norvig.com/beal2000.html), and [my name got associated](https://www.google.com/webhp?sourceid=chrome-instant&ion=1&espv=2&ie=UTF-8#q=beal%20conjecture) with Beal's Conjecture, which means I get a lot of emails with purported proofs or counterexamples (many asking how they can collect their prize money). So far, all the emails have been wrong. This page catalogs some of the more common errors and updates my 2000 program." "[Andrew Wiles](https://en.wikipedia.org/wiki/Andrew_Wiles) proved Fermat's theorem in 1995, but Beal's conjecture remains unproved, and Beal has offered [$1,000,000](http://www.ams.org/profession/prizes-awards/ams-supported/beal-prize) for a proof or disproof. I don't have the mathematical skills of Wiles, so I could never find a proof, but I can write a program to search for counterexamples. I first wrote [that program in 2000](http://norvig.com/beal2000.html), and [my name got associated](https://www.google.com/webhp?#q=beal conjecture) with Beal's Conjecture, which means I get a lot of emails with purported proofs or counterexamples (many asking how they can collect their prize money). So far, all the emails have been wrong. This notebook catalogs some of the more common errors, updates my 2000 program, and introduces this tool:\n",
] "\n",
}, "# Online Beal Counterexample Checker\n",
{ "\n",
"cell_type": "markdown", "If you think you might have a valid counterexample, you should check it with my [Online Beal Counterexample Checker](http://norvig.com/bealcheck.html).\n",
"metadata": { "\n",
"button": false,
"new_sheet": false,
"run_control": {
"read_only": false
}
},
"source": [
"# How to Not Win A Million Dollars\n", "# How to Not Win A Million Dollars\n",
"\n", "\n",
"\n", "\n",
"* A proof must show that there are no examples that satisfy the conditions. A common error is to show how a certain pattern generates an infinite collection of numbers that satisfy $A^x + B^y = C^z$ and then show that in all of these, $A, B, C$ have a common factor. But that's not good enough, unless you can also prove that no other pattern exists.\n", "* A proof must show that there are **no** examples that satisfy the conditions. A common error is to show how a certain pattern generates an infinite number of $(A, x, B, y, C, z)$ examples, and that the conjecture holds for this entire infinite collection. But that's not good enough, unless you can also prove that the conjecture holds for every other possible pattern.\n",
"\n", "\n",
"<p>\n", "<p>\n",
"\n", "\n",
@ -53,18 +47,12 @@
"\n", "\n",
"<p>\n", "<p>\n",
"\n", "\n",
"* A valid counterexample needs to satisfy all four conditions&mdash;don't leave one out:\n", "* A valid counterexample needs to satisfy all four conditions&mdash;don't leave one out.\n",
"\n", "\n",
"> $A, B, C, x, y, z$ are positive integers <br> \n",
"$x, y, z > 2$ <br>\n",
"$A^x + B^y = C^z$ <br>\n",
"$A, B, C$ have no common prime factor.\n",
"\n",
"(If you think you might have a valid counterexample, before you share it with Andrew Beal or anyone else, you can check it with my [Online Beal Counterexample Checker](http://norvig.com/bealcheck.html).)\n",
"\n", "\n",
"<p>\n", "<p>\n",
"\n", "\n",
"* One correspondent claimed that $27^4 + 162 ^ 3 = 9 ^ 7$ was a solution, because the first three conditions hold, and the common factor is 9, which isn't a prime. But of course, if $A, B, C$ have 9 as a common factor, then they also have 3, and 3 is prime. The phrase \"no common prime factor\" means the same thing as \"no common factor greater than 1.\"\n", "* One correspondent claimed that $27^4 + 162 ^ 3 = 9 ^ 7$ was a solution, because the first three conditions hold, and the common factor is 9, which isn't a prime. But of course, if $A, B, C$ have 9 as a common factor, then they also have 3, and 3 is prime. \"No common prime factor\" means the same thing as \"no common factor greater than 1.\"\n",
"\n", "\n",
"<p>\n", "<p>\n",
"\n", "\n",
@ -72,11 +60,11 @@
"\n", "\n",
"<p>\n", "<p>\n",
"\n", "\n",
"* A creative person offered $1359072^4 - 940896^4 = 137998080^3$, which fails both because $3^3 2^5 11^2$ is a common factor, and because it has a subtraction rather than an addition (although, as Julius Jacobsen pointed out, that can be rectified by adding $940896^4$ to both sides).\n", "* A creative person offered $1359072^4 - 940896^4 = 137998080^3$, which fails both because $3^3 2^5 11^2$ is a common factor, and because it has a subtraction rather than an addition (although, as Julius Jacobsen pointed out, it could be rewritten as $137998080^3 + 940896^4 = 1359072^4$).\n",
"\n", "\n",
"<p>\n", "<p>\n",
"\n", "\n",
"* Mustafa Pehlivan came up with an example involving 76-million-digit numbers, which took some work to prove wrong (by using modulo arithmetic). \n", "* Mustafa Pehlivan came up with an example involving 76-million-digit numbers, which took some work to prove wrong (using modulo arithmetic). \n",
"\n", "\n",
"<p>\n", "<p>\n",
"\n", "\n",
@ -84,7 +72,7 @@
"\n", "\n",
"<p>\n", "<p>\n",
"\n", "\n",
"* Multiple people proposed answers similar to this one:" "* Multiple people proposed counterexamples similar to this one:"
] ]
}, },
{ {
@ -92,15 +80,35 @@
"execution_count": 1, "execution_count": 1,
"metadata": { "metadata": {
"button": false, "button": false,
"collapsed": true, "collapsed": false,
"new_sheet": false, "new_sheet": false,
"run_control": { "run_control": {
"read_only": false "read_only": false
} }
}, },
"outputs": [], "outputs": [
{
"data": {
"text/plain": [
"True"
]
},
"execution_count": 1,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [ "source": [
"from math import gcd #### In Python versions < 3.5, use \"from fractions import gcd\"" "A, B, C = 60000000000000000000, 70000000000000000000, 82376613842809255677\n",
"x = y = z = 3.\n",
"A ** x + B ** y == C ** z"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"That's interesting; the equality is true. But to show that this is a valid counterexample, we have to show that `A, B, C` have no common factor; that is, that their greatest common divisor (`gcd`) is 1:"
] ]
}, },
{ {
@ -108,6 +116,7 @@
"execution_count": 2, "execution_count": 2,
"metadata": { "metadata": {
"button": false, "button": false,
"collapsed": false,
"new_sheet": false, "new_sheet": false,
"run_control": { "run_control": {
"read_only": false "read_only": false
@ -126,11 +135,9 @@
} }
], ],
"source": [ "source": [
"A, B, C = 60000000000000000000, 70000000000000000000, 82376613842809255677\n", "from math import gcd #### In Python versions < 3.5, use \"from fractions import gcd\"\n",
"\n", "\n",
"x = y = z = 3.\n", "gcd(gcd(A, B), C) == 1"
"\n",
"A ** x + B ** y == C ** z and gcd(gcd(A, B), C) == 1"
] ]
}, },
{ {
@ -143,9 +150,9 @@
} }
}, },
"source": [ "source": [
"**WOW! The result is `True`!** Is this a real counterexample to Beal? And also a disproof of Fermat?\n", "**WOW! The result is `True`!** Is this a real counterexample to Beal? And also a disproof of Fermat's Last Theorem?\n",
"\n", "\n",
"Alas, it is not. Notice the decimal point in \"`3.`\", indicating a floating point number, with inexact, limited precision. Change the inexact \"`3.`\" to an exact \"`3`\" and the result changes to \"`False`\". Below we see that the two sides of the equation are the same for the first 18 digits, but differ starting with the 19th: " "Alas, it is not. The decimal point in \"`x = y = z = 3.`\" indicates a floating point number, with inexact, limited precision. Change the inexact \"`3.`\" to an exact \"`3`\" and the two sides of the equation are no longer equal. Below we see they are the same for the first 18 digits, but differ starting with the 19th: "
] ]
}, },
{ {
@ -153,6 +160,7 @@
"execution_count": 3, "execution_count": 3,
"metadata": { "metadata": {
"button": false, "button": false,
"collapsed": false,
"new_sheet": false, "new_sheet": false,
"run_control": { "run_control": {
"read_only": false "read_only": false
@ -186,49 +194,43 @@
} }
}, },
"source": [ "source": [
"They say \"close\" only counts in horseshoes and hand grenades, and if you threw two horseshoes at a stake on the planet [Kapteyn-b](https://en.wikipedia.org/wiki/Kapteyn_b) (a possibly habitable and thus possibly horseshoe-playing exoplanet 12.8 light years from Earth) and the two paths differed in the 19th digit, the horseshoes would end up [less than an inch](https://www.google.com/webhp?sourceid=chrome-instant&ion=1&espv=2&ie=UTF-8#q=12.8%20light%20years%20*%201e-19%20in%20inches) apart. That's really, really close, but close doesn't count in number theory.\n", "They say \"close\" only counts in horseshoes and hand grenades, and if you threw two horseshoes at a stake on **[Kapteyn-b](https://en.wikipedia.org/wiki/Kapteyn_b)** (an exoplanet 12.8 light years from Earth that is habitable and thus possibly horseshoe-playing) and the two paths differed in the 19th digit, the horseshoes would end up [less than an inch](https://www.google.com/webhp?sourceid=chrome-instant&ion=1&espv=2&ie=UTF-8#q=12.8%20light%20years%20*%201e-19%20in%20inches) apart. That's really, really close, but close doesn't count in number theory.\n",
"\n",
"![Kapteyn-b and Homer Simpson](https://norvig.com/homer.png)\n",
"<center>Left: [Kapteyn-b](https://www.space.com/26115-oldest-habitable-alien-planet-kapteyn-b.html). &nbsp; &nbsp; Right: [Homer Simpson](https://www.youtube.com/watch?time_continue=1&v=ReOQ300AcSU).</center>\n",
"\n", "\n",
"\n", "\n",
"# *The Simpsons* and Fermat\n", "# *The Simpsons* and Fermat\n",
"\n", "\n",
"In two different [episodes of *The Simpsons*](http://www.npr.org/sections/krulwich/2014/05/08/310818693/did-homer-simpson-actually-solve-fermat-s-last-theorem-take-a-look), close counterexamples to Fermat's Last Theorem are shown: \n", "In two different [episodes of *The Simpsons*](http://www.npr.org/sections/krulwich/2014/05/08/310818693/did-homer-simpson-actually-solve-fermat-s-last-theorem-take-a-look), close counterexamples to Fermat's Last Theorem are shown: \n",
"$1782^{12} + 1841^{12} = 1922^{12}$ and $3987^{12} + 4365^{12} = 4472^{12}$. These were designed by *Simpsons* writer David X. Cohen to be correct up to the precision found in most handheld calculators. Cohen found the equations with a program that must have been something like this:" "$3987^{12} + 4365^{12} = 4472^{12}$ and $1782^{12} + 1841^{12} = 1922^{12}$. These were designed by *Simpsons* writer David X. Cohen to be correct up to the precision found in most handheld calculators. Cohen found the equations with a program that must have been something like this:"
] ]
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 4, "execution_count": 4,
"metadata": { "metadata": {
"button": false, "collapsed": false
"collapsed": true,
"new_sheet": false,
"run_control": {
"read_only": false
}
}, },
"outputs": [], "outputs": [],
"source": [ "source": [
"from collections import namedtuple\n",
"from itertools import combinations\n", "from itertools import combinations\n",
"\n", "\n",
"def simpsons(bases, powers):\n", "Fermat = namedtuple('Fermat', 'A, B, C, n')\n",
" \"\"\"Find the integers (A, B, C, n) that come closest to solving \n",
" Fermat's equation, A ** n + B ** n == C ** n. \n",
" Let A, B range over all pairs of bases and n over all powers.\"\"\"\n",
" equations = ((A, B, iroot(A ** n + B ** n, n), n)\n",
" for A, B in combinations(bases, 2)\n",
" for n in powers)\n",
" return min(equations, key=relative_error)\n",
"\n", "\n",
"def iroot(i, n): \n", "def err(equation):\n",
" \"The integer closest to the nth root of i.\"\n", " \"The relative error in a Fermat-style equation\"\n",
" return int(round(i ** (1./n)))\n",
"\n",
"def relative_error(equation):\n",
" \"Error between LHS and RHS of equation, relative to RHS.\" \n",
" (A, B, C, n) = equation\n", " (A, B, C, n) = equation\n",
" LHS = A ** n + B ** n\n", " return abs(A ** n + B ** n - C ** n) / C ** n\n",
" RHS = C ** n\n", "\n",
" return abs(LHS - RHS) / RHS" "def simpsons(bases, powers):\n",
" \"\"\"Find the Fermat equation that minimizes the error (the\n",
" difference between A ** n + B ** n and C ** n). \n",
" Let A, B range over all pairs of bases and n over all powers.\"\"\"\n",
" return min((Fermat(A, B, int((A ** n + B ** n) ** (1/n)), n) \n",
" for A, B in combinations(bases, 2) for n in powers),\n",
" key=err)"
] ]
}, },
{ {
@ -236,6 +238,7 @@
"execution_count": 5, "execution_count": 5,
"metadata": { "metadata": {
"button": false, "button": false,
"collapsed": false,
"new_sheet": false, "new_sheet": false,
"run_control": { "run_control": {
"read_only": false "read_only": false
@ -245,7 +248,7 @@
{ {
"data": { "data": {
"text/plain": [ "text/plain": [
"(1782, 1841, 1922, 12)" "Fermat(A=3987, B=4365, C=4472, n=12)"
] ]
}, },
"execution_count": 5, "execution_count": 5,
@ -254,7 +257,7 @@
} }
], ],
"source": [ "source": [
"simpsons(range(1000, 2000), [11, 12, 13])" "simpsons(range(3000, 5000), range(11, 14))"
] ]
}, },
{ {
@ -262,6 +265,7 @@
"execution_count": 6, "execution_count": 6,
"metadata": { "metadata": {
"button": false, "button": false,
"collapsed": false,
"new_sheet": false, "new_sheet": false,
"run_control": { "run_control": {
"read_only": false "read_only": false
@ -271,7 +275,7 @@
{ {
"data": { "data": {
"text/plain": [ "text/plain": [
"(3987, 4365, 4472, 12)" "Fermat(A=1010, B=1897, C=1988, n=3)"
] ]
}, },
"execution_count": 6, "execution_count": 6,
@ -280,7 +284,53 @@
} }
], ],
"source": [ "source": [
"simpsons(range(3000, 5000), [12])" "simpsons(range(1000, 2000), range(3, 16))"
]
},
{
"cell_type": "code",
"execution_count": 7,
"metadata": {
"collapsed": false
},
"outputs": [
{
"data": {
"text/plain": [
"(63976656349698612616236230953154487896987106,\n",
" 63976656348486725806862358322168575784124416)"
]
},
"execution_count": 7,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"3987 ** 12 + 4365 ** 12, 4472 ** 12"
]
},
{
"cell_type": "code",
"execution_count": 8,
"metadata": {
"collapsed": false
},
"outputs": [
{
"data": {
"text/plain": [
"(2541210258614589176288669958142428526657,\n",
" 2541210259314801410819278649643651567616)"
]
},
"execution_count": 8,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"1782 ** 12 + 1841 ** 12, 1922 ** 12"
] ]
}, },
{ {
@ -293,21 +343,22 @@
} }
}, },
"source": [ "source": [
"# Back to Beal\n", "# Back to `beal`\n",
"\n", "\n",
"In October 2015 I looked back at my original [program from 2000](http://norvig.com/beal2000.html).\n", "In October 2015 I looked back at my original [program from 2000](http://norvig.com/beal2000.html).\n",
"I ported it from Python 1.5 to 3.5 (by putting parens around the argument to `print` and adding `long = int`). The program runs 250 times faster today than it did in 2000, a tribute to both computer hardware engineers and the developers of the Python interpreter.\n", "I ported it from Python 1.5 to 3.5 (`print` is now a function, `long` is `int`). It runs 250 times faster today, a tribute to both computer hardware engineers and the developers of the Python interpreter.\n",
"\n", "\n",
"I found that I was a bit confused about the definition of [the problem in 2000](https://web.archive.org/web/19991127081319/http://bealconjecture.com/). I thought then that, *by definition*, $A$ and $B$ could not have a common factor, but actually, the definition of the conjecture only rules out examples where all three of $A, B, C$ share a common factor. Mark Tiefenbruck (and later Edward P. Berlin and Shen Lixing) wrote to point out that my thought was actually correct, not by definition, but by derivation: if $A$ and $B$ have a commmon prime factor $p$, then the sum of $A^x + B^y$ must also have that factor $p$, and since $A^x + B^y = C^z$, then $C^z$ and hence $C$ must have the factor $p$. So I was wrong twice, and in this case two wrongs did make a right.\n", "I found that I had [misstated the problem](https://web.archive.org/web/19991127081319/http://bealconjecture.com/) in 2000. I thought that, *by definition*, $A$ and $B$ could not have a common factor, but actually, \n",
"the conjecture only rules out examples where all three of $A, B, C$ share a common factor. But, as [Mark Tiefenbruck](mailto:mark @tiefenbruck.org) (as well as Edward P. Berlin and Shen Lixing) pointed out, my statement is correct, not by definition, but *by derivation:* if $A$ and $B$ have a commmon prime factor $p$, then the sum of $A^x + B^y$ must also have that factor $p$, and hence $C^z$, and $C$, must have the factor $p$.\n",
"\n", "\n",
"Mark Tiefenbruck also suggested an optimization: only consider exponents that are odd primes, or 4. The idea is that a number like 512 can be expressed as either $2^9$ or $8^3$, and my program doesn't need to consider both. In general, any time we have a composite exponent, such as $b^{qp}$, where $p$ is prime, we should ignore $b^{(qp)}$, and instead consider only $(b^q)^p$. There's one complication to this scheme: 2 is a prime, but 2 is not a valid exponent for a Beal counterexample. So we will allow 4 as an exponent, as well as all odd primes up to `max_x`.\n", "Mark Tiefenbruck also suggested another optimization: only consider exponents that are odd primes, or 4. The idea is that a number like 512 can be expressed as either $2^9$ or $8^3$, and my program doesn't need to consider both. In general, any time we have a composite exponent, such as $b^{qp}$, where $p$ is prime, we should ignore $A=b, x=qp$, and instead consider only $A=b^q, x=p$. There's one complication to this scheme: 2 is a prime, but 2 is not a valid exponent for a Beal counterexample. So we will allow 4 as an exponent, as well as all odd primes up to `max_x`.\n",
"\n", "\n",
"Here is the complete, updated, refactored, optimized program:" "Here is the complete, updated program:"
] ]
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 7, "execution_count": 9,
"metadata": { "metadata": {
"button": false, "button": false,
"collapsed": true, "collapsed": true,
@ -373,9 +424,10 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 8, "execution_count": 10,
"metadata": { "metadata": {
"button": false, "button": false,
"collapsed": false,
"new_sheet": false, "new_sheet": false,
"run_control": { "run_control": {
"read_only": false "read_only": false
@ -386,8 +438,8 @@
"name": "stdout", "name": "stdout",
"output_type": "stream", "output_type": "stream",
"text": [ "text": [
"CPU times: user 256 ms, sys: 1.44 ms, total: 257 ms\n", "CPU times: user 362 ms, sys: 3.33 ms, total: 366 ms\n",
"Wall time: 256 ms\n" "Wall time: 406 ms\n"
] ]
} }
], ],
@ -410,9 +462,10 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 9, "execution_count": 11,
"metadata": { "metadata": {
"button": false, "button": false,
"collapsed": false,
"new_sheet": false, "new_sheet": false,
"run_control": { "run_control": {
"read_only": false "read_only": false
@ -423,8 +476,8 @@
"name": "stdout", "name": "stdout",
"output_type": "stream", "output_type": "stream",
"text": [ "text": [
"CPU times: user 29.1 s, sys: 25.2 ms, total: 29.2 s\n", "CPU times: user 43.3 s, sys: 335 ms, total: 43.7 s\n",
"Wall time: 29.2 s\n" "Wall time: 46.5 s\n"
] ]
} }
], ],
@ -454,9 +507,10 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 10, "execution_count": 12,
"metadata": { "metadata": {
"button": false, "button": false,
"collapsed": false,
"new_sheet": false, "new_sheet": false,
"run_control": { "run_control": {
"read_only": false "read_only": false
@ -474,7 +528,7 @@
" 6: [216, 1296, 7776, 279936]}" " 6: [216, 1296, 7776, 279936]}"
] ]
}, },
"execution_count": 10, "execution_count": 12,
"metadata": {}, "metadata": {},
"output_type": "execute_result" "output_type": "execute_result"
} }
@ -499,9 +553,10 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 11, "execution_count": 13,
"metadata": { "metadata": {
"button": false, "button": false,
"collapsed": false,
"new_sheet": false, "new_sheet": false,
"run_control": { "run_control": {
"read_only": false "read_only": false
@ -534,7 +589,7 @@
" 279936: 6}" " 279936: 6}"
] ]
}, },
"execution_count": 11, "execution_count": 13,
"metadata": {}, "metadata": {},
"output_type": "execute_result" "output_type": "execute_result"
} }
@ -546,8 +601,10 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 12, "execution_count": 14,
"metadata": {}, "metadata": {
"collapsed": false
},
"outputs": [ "outputs": [
{ {
"data": { "data": {
@ -555,7 +612,7 @@
"3" "3"
] ]
}, },
"execution_count": 12, "execution_count": 14,
"metadata": {}, "metadata": {},
"output_type": "execute_result" "output_type": "execute_result"
} }
@ -584,9 +641,10 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 13, "execution_count": 15,
"metadata": { "metadata": {
"button": false, "button": false,
"collapsed": false,
"new_sheet": false, "new_sheet": false,
"run_control": { "run_control": {
"read_only": false "read_only": false
@ -632,9 +690,10 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 14, "execution_count": 16,
"metadata": { "metadata": {
"button": false, "button": false,
"collapsed": false,
"new_sheet": false, "new_sheet": false,
"run_control": { "run_control": {
"read_only": false "read_only": false
@ -647,7 +706,7 @@
"{True}" "{True}"
] ]
}, },
"execution_count": 14, "execution_count": 16,
"metadata": {}, "metadata": {},
"output_type": "execute_result" "output_type": "execute_result"
} }
@ -676,12 +735,12 @@
} }
}, },
"source": [ "source": [
"I get nervous having an incorrect version of `gcd` around; let's change it back, quick!" "I get nervous having an incorrect version of `gcd` around: change it back, quick!"
] ]
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 15, "execution_count": 17,
"metadata": { "metadata": {
"button": false, "button": false,
"collapsed": true, "collapsed": true,
@ -712,9 +771,10 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 16, "execution_count": 18,
"metadata": { "metadata": {
"button": false, "button": false,
"collapsed": false,
"new_sheet": false, "new_sheet": false,
"run_control": { "run_control": {
"read_only": false "read_only": false
@ -727,7 +787,7 @@
"'tests pass'" "'tests pass'"
] ]
}, },
"execution_count": 16, "execution_count": 18,
"metadata": {}, "metadata": {},
"output_type": "execute_result" "output_type": "execute_result"
} }
@ -832,7 +892,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 17, "execution_count": 19,
"metadata": { "metadata": {
"button": false, "button": false,
"collapsed": true, "collapsed": true,
@ -897,8 +957,10 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 18, "execution_count": 20,
"metadata": {}, "metadata": {
"collapsed": false
},
"outputs": [ "outputs": [
{ {
"data": { "data": {
@ -911,7 +973,7 @@
" 6: [(216, 3), (296, 4), (776, 5), (936, 7)]}" " 6: [(216, 3), (296, 4), (776, 5), (936, 7)]}"
] ]
}, },
"execution_count": 18, "execution_count": 20,
"metadata": {}, "metadata": {},
"output_type": "execute_result" "output_type": "execute_result"
} }
@ -937,9 +999,10 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 19, "execution_count": 21,
"metadata": { "metadata": {
"button": false, "button": false,
"collapsed": false,
"new_sheet": false, "new_sheet": false,
"run_control": { "run_control": {
"read_only": false "read_only": false
@ -971,7 +1034,7 @@
" 936: [(6, 7)]})" " 936: [(6, 7)]})"
] ]
}, },
"execution_count": 19, "execution_count": 21,
"metadata": {}, "metadata": {},
"output_type": "execute_result" "output_type": "execute_result"
} }
@ -995,9 +1058,10 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 20, "execution_count": 22,
"metadata": { "metadata": {
"button": false, "button": false,
"collapsed": false,
"new_sheet": false, "new_sheet": false,
"run_control": { "run_control": {
"read_only": false "read_only": false
@ -1008,8 +1072,8 @@
"name": "stdout", "name": "stdout",
"output_type": "stream", "output_type": "stream",
"text": [ "text": [
"CPU times: user 35.5 s, sys: 44.1 ms, total: 35.5 s\n", "CPU times: user 1min 2s, sys: 646 ms, total: 1min 3s\n",
"Wall time: 35.5 s\n" "Wall time: 1min 8s\n"
] ]
} }
], ],
@ -1035,15 +1099,6 @@
"\n", "\n",
"This was fun, but I can't recommend anyone spend a serious amount of computer time looking for counterexamples to the Beal Conjecture&mdash;the money you would have to spend in computer time would be more than the expected value of your prize winnings. I suggest you work on a proof rather than a counterexample, or work on some other interesting problem instead!" "This was fun, but I can't recommend anyone spend a serious amount of computer time looking for counterexamples to the Beal Conjecture&mdash;the money you would have to spend in computer time would be more than the expected value of your prize winnings. I suggest you work on a proof rather than a counterexample, or work on some other interesting problem instead!"
] ]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": []
} }
], ],
"metadata": { "metadata": {
@ -1062,7 +1117,7 @@
"name": "python", "name": "python",
"nbconvert_exporter": "python", "nbconvert_exporter": "python",
"pygments_lexer": "ipython3", "pygments_lexer": "ipython3",
"version": "3.5.3" "version": "3.6.0"
} }
}, },
"nbformat": 4, "nbformat": 4,