the formula that works with the data is as follows:
a[n] = a[n-1] + (n-1)^2
here's a table of values based on that formula.
the table starts with a[1] being given as 0.
n (n-1)^2 a[n]
1 n/a given as 0
2 1^2 = 1 1 + 0 = 1
3 2^2 = 4 4 + 1 = 5
4 3^2 = 9 9 + 5 = 14
5 4^2 = 16 16 + 14 = 30
6 5^2 = 25 25 + 30 = 55
...
you are given that the a[1] = 0
the rest of them are derived from the formula.
the same formula is used every time.
let me know if this solves the problem for you.