__Permutations and Fermat’s Theorem
__

Let us define the Fermat Equation as

x^{n}+y^{n} =z^{n
}(1)

1<x<y<z. (3)

^{n}, y^{n} and z^{n}
are all integers. But according to Fermat’s Theorem, x ** cannot** be an integer when
n>2. In such cases x

** is** an integer, and show
why Fermat was right in cases where n>2.

for y=x+1 to x+1+ 1000

for z=y+1 y+1+to 1000

Permutation_{(x,y,z)}={x,y,z}

next z

next y

next x

Let us now define a __Sum__ for each of these 1 billion
Permutations:

Sum_{(x,y,z)}=z^{n}-y^{n}-x^{n}.
(4)

In any case where it is found that sum=0, x is an integer.

Program (A) computes Permutations {x,y,z} for the first ten instances of Sum=0. The results are displayed in Table (1) with n=2.

__Table 1
__

__
Perm____x____y____z__

996004 |
3 |
4 |
5 |

1993969 |
5 |
12 |
13 |

2483529 |
6 |
8 |
10 |

2991808 |
7 |
24 |
25 |

3474516 |
8 |
15 |
17 |

3962101 |
9 |
12 |
15 |

3989385 |
9 |
40 |
41 |

4463445 |
10 |
24 |
26 |

4986516 |
11 |
60 |
61 |

5431747 |
12 |
16 |
20 |

Note that, when n=2, there ** are** Permutations where
Sum=0 … a result well known by the ancient Greek, Pythagoras.

** no**
zero sums are computed … not in a single one of the first billion
permutations! Should we insist that an

Cases where n>3 can easily be checked using Program (A). In every such case Fermat is corroborated.

A final comment regarding mathematical purity may be in
order. Mathematician Andrew Wiles has derived a proof that Fermat’s Theorem is
correct for ** all** possible permutations of x, y and z, where the number of
permutations is infinite. His proof is reportedly over 200 pages long and
invokes ideas unknown in Fermat’s day. Fermat claimed, in a celebrated
marginal note, that he had an elegant

__Program 1
__

#COMPILE EXE

#DIM ALL

FUNCTION PBMAIN () AS LONG

DIM n AS LONG

'Change n to value >2 as desired. Then run program.

n=3

DIM limit AS LONG

limit=1000

DIM Hits AS LONG

DIM x AS QUAD

DIM y AS QUAD

DIM z AS QUAD

DIM sum AS QUAD

DIM Perm AS QUAD

OPEN "c:\users\marjorie dixon\documents\plotsiteration.dat" FOR OUTPUT
AS #1

OPEN "c:\users\marjorie dixon\documents\plotssum.dat" FOR OUTPUT AS #2

OPEN "c:\users\marjorie dixon\documents\plotsx1.dat" FOR OUTPUT AS #3

OPEN "c:\users\marjorie dixon\documents\plotsy1.dat" FOR OUTPUT AS #4

OPEN "c:\users\marjorie dixon\documents\plotsz1.dat" FOR OUTPUT AS #5

CLOSE 1

CLOSE 2

CLOSE 3

CLOSE 4

CLOSE 5

OPEN "c:\users\marjorie dixon\documents\plotsiteration.dat" FOR APPEND
AS #1

OPEN "c:\users\marjorie dixon\documents\plotssum.dat" FOR APPEND AS #2

OPEN "c:\users\marjorie dixon\documents\plotsx1.dat" FOR APPEND AS #3

OPEN "c:\users\marjorie dixon\documents\plotsy1.dat" FOR APPEND AS #4

OPEN "c:\users\marjorie dixon\documents\plotsz1.dat" FOR APPEND AS #5

Hits=0

Perm=0

FOR x=1 TO limit

FOR y=x+1 TO x+1+limit

FOR z=y+1 TO y+1+limit

sum=z^n-y^n-x^n

IF sum=0 THEN

hits=hits+1

IF hits>10 THEN

GOTO EndIT

END IF

END IF

IF sum=0 THEN

WRITE #1,Perm

WRITE #2,sum

WRITE #3,x

WRITE #4,y

WRITE #5,z

END IF

Perm=Perm+1

NEXT z

NEXT y

NEXT x

EndIT:

MSGBOX("Hits=" & STR$(Hits))

MSGBOX("Permutations=" & STR$(Perm))

CLOSE 1

CLOSE 2

CLOSE 3

CLOSE 4

CLOSE 5

MSGBOX("Ready For Plotting")

END FUNCTION

**End
of Article
**