How to calculate the number of items? 1 + 4 + 10 +. + (3N + 4) + (3N + 7) =? How many items in total?

How to calculate the number of items? 1 + 4 + 10 +. + (3N + 4) + (3N + 7) =? How many items in total?

an=a1+(n-1)d
n=((an-a1)/d)+1
=((3n+7-1)/3)+1
=n+3
1+4+7+10+.+(3n+4)+(3n+7)
=(3n+7+1)(n+3)/2
=(3n+8)(n+3)/2