O maior valor de um tal que a2 ≡ um mod 6 é 4. Vamos chamar M (n) o maior valor de um <n tal que a2 ≡ a (mod n). Então M (6) = 4.
Encontre ∑M (n) para 1 ≤ n ≤ 107.
euler407()
deve retornar 39782849136421.
testString: 'assert.strictEqual(euler407(), 39782849136421, "euler407()
should return 39782849136421.");'
```