### Random Post

### Recent Posts

### Recent Comments

Hugh Casement on Enigma 1070: Time to work | |

Jim Randell on Enigma 1070: Time to work | |

Jim Randell on Enigma 1070: Time to work | |

geoffrounce on Enigma 440: Three X | |

Jim Randell on Enigma 1588: As easy as 1… |

### Archives

### Categories

- article (11)
- enigma (1,157)
- misc (2)
- project euler (2)
- puzzle (39)
- site news (44)
- tantalizer (42)
- teaser (3)

### Site Stats

- 177,568 hits

Advertisements

Let’s suppose the number in question is

x, and the sum of it and its reciprocal is some integern.We note that, for a fixed

n, ifxis a solution to this equation then1/xis also a solution, and this can be rewritten as a quadratic equation (x ≠ 0), so these are the only two solutions.If

x ≠ 1then one of these solutions will be larger than 1 and one will be smaller than 1.The teacher then asks the class to consider the expression:

We note that

S(0) = 2, andS(1) = n.Now consider:

So we have the recurrence relation:

This Python program uses this relation to generate possible sequences that include 123. It runs in 32ms.

Solution:The next student’s answer is 322.The sequence in this case is:

S(0) = 2, S(1) = 3, S(2) = 7, S(3) = 18, S(4) = 47, S(5) = 123, S(6) = 322.So the student that got 123 is dealing with fifth powers, and the student that got 322 is dealing with sixth powers.

The number

xin this case is a solution to:so:

The other sequence that contains 123 is when

S(1) = 123. And in this case the next number in the sequence isS(2) = 15127. But the question implies that 123 is not the answer toS(1)(or, indeed,S(2)orS(3)), so we can discard this solution.Your x looks familiar, Jim. The larger value is phi² = 1 + phi, the smaller is of course its reciprocal but also equals (phi – 1)² = 2 – phi, where phi is the golden ratio.

The recurrence relation certainly saves a lot of slog.