How does the pulsation of stars relate to their distance from earth?