- Trending Categories
- Data Structure
- Networking
- RDBMS
- Operating System
- Java
- iOS
- HTML
- CSS
- Android
- Python
- C Programming
- C++
- C#
- MongoDB
- MySQL
- Javascript
- PHP

- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who

# Sum of the first N terms of the series 2,10, 30, 68,…. in C programming

To find the sum of this series, we will first analyze this series.

The series is:

The given series is 2,10, 30, 68…

**For example**

For n = 6 Sum = 464

On analysis of the given series, you will see that the series is the addition of two series first one is the series of n natural numbers and the second is the cube of n natural numbers this means the series can be split as:

2, 10 , 30 ,68 = (1+13) , (2+23), (3 + 33), ( 4 + 43)

so we can write the sum of the series as :

sum = 2 + 10 + 30 + 68… = ( 1 + 2 + 3 + 4...)+( 13 + 23 + 33 + 43….)

based on this the formula for calculation of the series will also be defined as the sum of formulas of the two.

the mathematical formula for finding the sum of the above series is :

n*(n + 1)/2 + (n*(n + 1)/2)^2

## Example

#include <stdio.h> int main() { int n = 6; int sum = (n*(n + 1)/2) + (n*(n+1)/2)*(n*(n+1)/2); printf("the sum of series till %d is %d", n,sum); return 0; }

## Output

the sum of series till 6 is 462

- Related Questions & Answers
- Sum of the first N terms of the series 2, 6, 12, 20, 30…. in c programming
- C++ program to find n-th term of series 2, 10, 30, 68, 130 …
- Sum of the first N terms of the series 5,12, 23, 38…. in C Programming
- Find Sum of Series 1^2 - 2^2 + 3^2 - 4^2 ... upto n terms in C++
- C Programming for sum of the series 0.6, 0.06, 0.006, 0.0006, …to n terms
- Sum of the series 2^0 + 2^1 + 2^2 +...+ 2^n in C++
- Find sum of the series ?3 + ?12 +.... upto N terms in C++
- Sum of the series 1 / 1 + (1 + 2) / (1 * 2) + (1 + 2 + 3) / (1 * 2 * 3) + … + upto n terms in C++
- Sum of the series 0.7, 0.77, 0.777 … upto n terms in C++
- Sum of the series 1.2.3 + 2.3.+ … + n(n+1)(n+2) in C
- Sum of the series 1^1 + 2^2 + 3^3 + ... + n^n using recursion in C++
- Find sum of the series 1+22+333+4444+... upto n terms in C++
- Sum of series 1^2 + 3^2 + 5^2 + . . . + (2*n - 1)^2 in C++
- C/C++ Program to Find the sum of Series with the n-th term as n^2 – (n-1)^2
- C++ Program to find the sum of the series 23+ 45+ 75+….. upto N terms

Advertisements