Define r to be the sum of the squares of the first n integers.

Click here for the answer

r[0] == 0

r[n] == n^2 +r[n-1]