## Teaser 2931: Unfortunate 57

**From The Sunday Times, 25th November 2018** [link]

In the early days of the internet, I used a secret shorthand for my important passwords:

Bank=1/7, Credit Card=2/7, ISP=3/7, etc.

Like all fractions, the decimal expansions:

1/7 = 0.142857142857142…

2/7 = 0.285714285714285…eventually repeat themselves, in this case in sequences of six digits. In each case, my password was the set of digits that repeat (“Unfortunate 57” is a mnemonic for 142857). As password requirements became stricter, I changed my system to base 11, using an X for the extra digit for “ten”; so for instance in base 11:

234 (= 1 × 11² + 10 × 11¹ + 3 × 11⁰) is 1X3 [base 11], and;

1/2 = 0.5555… [base 11] = 5 / (11¹) + 5 / (11²) + 5 / (11³) + …In the sequence 1/2, 1/3, …, what is the first password of length greater than six that my base-11 system produces?

The setter is probably conflating “the internet” with “the world wide web”.

[teaser2931]

## Jim Randell 7:58 am

on22 March 2019 Permalink |For

Enigma 1247I wrote the [[ recurring() ]] function, which will calculate the recurring representation of a fraction in a given base.We can use this routine in a short Python program to solve this puzzle. It runs in 74ms.

Run:[ @repl.it ]Solution:The first password with length greater than 6 is: 093425X17685.It is produced by the fraction 1/13 (in decimal notation).

LikeLike