## Totient Stairstep Sequences

### Problem 337

Published on Saturday, 7th May 2011, 10:00 pm; Solved by 306Let {a_{1}, a_{2},..., a_{n}} be an integer sequence of length `n` such that:

- a
_{1}= 6 - for all 1 ≤
`i`<`n`: φ(a_{i}) < φ(a_{i+1}) < a_{i}< a_{i+1}^{1}

Let S(`N`) be the number of such sequences with a_{n} ≤ `N`.

For example, S(10) = 4: {6}, {6, 8}, {6, 8, 9} and {6, 10}.

We can verify that S(100) = 482073668 and S(10 000) mod 10^{8} = 73808307.

Find S(20 000 000) mod 10^{8}.

^{1} φ denotes **Euler's totient function**.