49
6
Write a program, in the language of your choice, that appears to successfully find a counterexample to Fermat's Last Theorem. That is, find integers a, b, c > 0 and n > 2 such that an + bn = cn.
Of course, you can't really do it, unless there's a flaw in Andrew Wiles' proof. I mean fake it, by relying on
- integer overflow
- floating-point rounding error
- undefined behavior
- data types with unusual definitions of addition, exponentiation, or equality
- compiler/interpreter bugs
- or something along those lines.
You may hard-code some or all of the variables a
, b
, c
, or n
, or search for them by doing loops like for a = 1 to MAX
.
This isn't a code golf; it's a contest to find clever and subtle solutions.
actually, you can have ones as all of them besides the exponent, which has to be 3 or higher. So, 1^3+1^3=1^3 its that simple. – None – 2014-10-23T02:21:45.280
2@Siver: 1³+1³=2; 1³=1; 2≠1 – dan04 – 2014-10-23T03:52:41.880