looks like day 15 is just the Chinese Remainder Theorem