write a C program to provide the sum of first 10 terms sequence of 2,5,14,41,122 calculate the sum through a function.
Answers
Answer:-
Sum of the First nn Terms of an Arithmetic Sequence
Suppose a sequence of numbers is arithmetic (that is, it increases or decreases by a constant amount each term), and you want to find the sum of the first nn terms.
Denote this partial sum by SnSn . Then
Sn=n(a1 + an)2Sn=n(a1 + an)2 ,
where nn is the number of terms, a1a1 is the first term and anan is the last term.
The sum of the first nn terms of an arithmetic sequence is called an arithmetic series .
Example 1:
Find the sum of the first 2020 terms of the arithmetic series if a1=5a1=5 and a20=62a20=62 .
S20=20(5 + 62)2S20=670S20=20(5 + 62)2S20=670
Example 2:
Find the sum of the first 4040 terms of the arithmetic sequence 2,5,8,11,⋯2,5,8,11,⋯ .
First find the 40th40th term:
a40=a1+(n−1)d =2+39(3)=119a40=a1+(n−1)d =2+39(3)=119
Then find the sum:
Sn=n(a1 +
Hope it helps you .
Mark as brainleist.