5-smooth totients

 Published on Sunday, 17th May 2015, 10:00 am; Solved by 1462;
Difficulty rating: 20%

Problem 516

5-smooth numbers are numbers whose largest prime factor doesn't exceed 5.
5-smooth numbers are also called Hamming numbers.
Let S(L) be the sum of the numbers n not exceeding L such that Euler's totient function φ(n) is a Hamming number.

Find S(1012). Give your answer modulo 232.