ChiralWaltz
- 161
- 5
Homework Statement
Write a loop in C for to sum the following sequence 3+6+12+20+30+...nth.
Homework Equations
n/a
The Attempt at a Solution
I have tried to factor but there are no common factors between 3 and 20 other than 1.
2*5=10------->10+20=30
2*4=8--------->8+12=20
2*3=6--------->6+6=12
2*2=4--------->4+3=7:(
I'm stuck. Any ideas?