### Shades of Fermat's Last Theorem

The familiar Pythagorean 3-4-5 triple gives one solution to (x-1)^n + x^n = (x+1)^n so what about other solutions for x an integer and n= 2, 3, 4 or 5?

### Exhaustion

Find the positive integer solutions of the equation (1+1/a)(1+1/b)(1+1/c) = 2

### Code to Zero

Find all 3 digit numbers such that by adding the first digit, the square of the second and the cube of the third you get the original number, for example 1 + 3^2 + 5^3 = 135.

# Farey Neighbours

##### Stage: 5 Challenge Level:

The Farey sequence $F_n$ is the list written in increasing order of all the rational numbers between $0$ and $1$ that have only the numbers $1, 2, 3, ... n$ as denominators. We have \eqalign{F_1&=\frac{0}{1}, \frac{1}{1}\cr F_2&=\frac{0}{1}, \frac{1}{2}, \frac{1}{1}.}

For the two rational numbers $\frac{b}{d}$ and $\frac{a}{c}$ the mediant is defined as $\frac{a+b}{c+d}$. Show that if $0< \frac{b}{d} < \frac{a}{c}< 1$ then $\frac{b}{d} < \frac{a+b}{c+d} < \frac{a}{c}$.

Clearly each Farey sequence $F_{n+1}$ must contain all of the terms of $F_{n}$, along with some new terms. Each 'new' term in the Farey sequence $F_{n+1}$ is the mediant of two consecutive terms in $F_n$, but not all mediants of consecutive terms of $F_n$ are included: where the denominator of the mediant is greater than $n+1$ the mediant does not occur in $F_{n+1}$ and instead two consecutive terms in $F_n$ are repeated in $F_{n+1}$.

Use the mediants to work out $F_3, F_4$ and $F_5$.

In every Farey sequence, if $\frac{b}{d}$ and $\frac{a}{c}$ are consecutive terms (said to be Farey neighbours) then prove, using mathematical induction, that $|ad-bc|=1$.

This is the key result that links Farey sequences to infinite sets of circles that are packed together, each circle touching its neighbours. See the problem Ford Circles.