Solved problem 120 (square remainders), mostly by hand (in comments).