2021 AIME #5

Call a three-term strictly increasing arithmetic sequence of integers special if the sum of the squares of the three terms equals the product of the middle term and the square of the common difference. Find the sum of the third terms of all special sequences.

2016 AIME I #14

Centered at each lattice point in the coordinate plane are a circle with radius 1/10 and a square with sides of length 1/5 whose sides are parallel to the coordinate axes. The line segment from (0,0) and (1001, 429) intersects m of the squares and n of the circles. Find m+n.