Isochronous dynamical systems and Diophantine relations. I.