### Random Post

### Recent Posts

### Recent Comments

Brian Gladman on Enigma 1057: Recycled cha… | |

Jim Randell on Enigma 1057: Recycled cha… | |

geoffrounce on Enigma 452: Figure out these… | |

Jim Randell on Enigma 452: Figure out these… | |

Jim Randell on Enigma 1627: A riddle for the… |

### Archives

### Categories

- article (11)
- enigma (1,183)
- misc (2)
- project euler (2)
- puzzle (46)
- site news (46)
- tantalizer (49)
- teaser (3)

### Site Stats

- 184,903 hits

Advertisements

I assumed the policy numbers are all different, otherwise the policy with a value of 0 could just be repeated five times to form the list.

The following Python program generates a sequence of numbers where each is

Ntimes the previous number, and this process is repeatedKtimes. For this puzzle we useN = 2, K = 4. It runs in 44ms.Solution:The last number on the list was 842105263157894736.The policy numbers are all 18 digits long. The five policy numbers are:

Additional solutions occur for longer policy numbers that are repeats of the numbers above. So, the next smallest solution occurs with policy numbers that are 36 digits long:

Considered as the digits after a decimal point these numbers correspond to the recurring portion of the fractions 1/19, 2/19, 4/19, 8/19, 16/19.

I started off with some algebraic analysis with the intention of writing some code to solve the problem, but ended up solving the problem completely with algebra:

If the policies have N digits, suppose is one of the first four policies, where y is a single digit, then

so

and ,

So mod .

If , then , i.e. the multiplicative order of 10 mod 19

(http://oeis.org/A084680)

The fifth policy is therefore