**From New Scientist #1576, 3rd September 1987** [link]

Time and again, you’ve been asked to sort out letters-for-digits puzzles, where digits are consistently replaced by letters, different letters being used for different digits. Today, that recurring theme is used in a truly recurring way. The fraction on the left (which is in its simplest form) represents the recurring decimal on the right. Should you want an extra optional clue, I can also tell you that the last two digits of the numerator of the fraction are equal.

What is AGAIN?

[enigma426]

### Like this:

Like Loading...

A little bit of analysis:

If the numerator of the fraction is

x, we can derive the integer equation:Using the extra optional clue, we can consider numerators of the form

abb, which means we only have to consider two digit numbers of the formaband then we can just add an extrabdigit to the end. So we only have to check 90 values forx.This Python program runs in 97ms.

Run:[ @repl.it ]Solution:AGAIN = 38354.The actual expression is:

where the digits in brackets repeat indefinitely.

Without the extra clue we can consider all three digit values of

xfrom 100 to 999 (900 values), which takes the above program 289ms to consider.But without being told anything about the “shape” of

xwe can solve the puzzle as an alphametic, and find that there is only one solution. (Even when the fraction is allowed to be not in lowest terms).This Python program uses the [[

`SubstitutedExpression()`

]] solver from theenigma.pylibrary and runs in 557ms.