C programming series of

1,3,6,11,19,31.....10th term

Hmmm. The differences are

2,3,5,8,12, ...
1,2,3,4,...
So using C syntax, code up the loop
s=1
d1 = 1
d2 = 0
for i=1..10 {
if i > 1 {d1 += d2}
d2++
s += d1+d2
}