“Overcoming jet lag is fundamentally a math problem and we’ve calculated the optimal way of doing it,” says Danny Forger, professor of mathematics at the University of Michigan (U-M) College of Literature, Science, and the Arts, in a release.U-M mathematicians have created a smart phone app that they say will help travelers snap their internal clocks to new time zones as efficiently as possible. Dubbed Entrain, the free app is believed to be the first to take a numbers-based approach to “entrainment,” the scientific term for synchronizing circadian rhythms with the outside hour. It’s based on new findings by Forger and Kirill Serkh, a doctoral student at Yale University who worked on the project while an undergraduate at U-M.

The shortcuts the app offers are custom schedules of light and darkness depending on the itinerary. The schedules boil down to one block of time each day when users should seek the brightest light possible and another when travelers should put themselves in the dark, or at least in dim light.

If users must go outside during the dim light recommended periods, the creators recommend the traveler wear pink-tinted glasses to block blue wavelength light. And if the app prescribes “bright outdoor light” in the middle of the night, a therapeutic light box can do the job.

To show how this new method is different, the researchers illustrate circadian rhythms as a clock with a point at the hour when body temperature is lowest. This usually occurs about 2 hours before a person wakes up. If the point is usually at 5 am and a person travels overseas, it could abruptly swing over to, say, 3 pm in your destination. The person is likely to experience jet lag until the system adjusts and the body is once again at its lowest temperature just a few hours before the alarm goes off.

“The way other approaches get these points to line up again is by inching along on the outside of the circle, sometimes pushing you toward and sometimes pulling you away from the target. But our schedules can just cut through the middle,” says Olivia Walch, a mathematics doctoral student who built the app. “This is almost like a body hack to get yourself entrained faster.”