There is a total of 70 squares of three sizes whose vertices are points on this rectangular $3\times n$ grid of points. What is the value of $n$?
http://www.stutzfamily.com/mrstutzblog/wp-content/uploads/2012/02/2009_Chapter_Solution_Set_2009_-_v2.pdf
Page 7
I also have had this problem for alcumus- it was a very challenging one ! I eventually solved it, so I can give you a hint:
Consider the possible ways to make a square. Find a pattern in each of every one of them. Add them up to form an equation, and the answer is your answer.
I will post a solution later