Project Euler 717 - Summation of a Modular Formula

Official link: https://projecteuler.net/problem=717