candidate: The key insight is that , in many cases of interest ( such as theta functions ) , the singularities occur at the roots of unity , and the significance of the singularities is in the order of the Farey sequence .