Welcome to the sum of first N numbers calculator, where the following 5 problems can be easily solved:
- The sum of first N natural numbers
- The sum of first N even numbers
- The sum of first N odd numbers
- The sum of first N prime numbers
- The sum of first N composite numbers
How to calculate the sum of first N natural numbers
Natural numbers refer to the set of non-negative integers, i.e. 0 and positive integers, which are often represented by N. To calculate the sum of first N natural numbers, you must find out first N natural numbers first, and then add up these natural numbers to get the answer.
For example, the sum of first 6 natural numbers.
- First 6 natural numbers are: 0, 1, 2, 3, 4, 5
- The sum of first 6 natural numbers is: 0 + 1 + 2 + 3 + 4 + 5 = 15
Calculate the sum of first N natural numbers using the formula
From the definition of natural numbers above, we know that natural numbers are a set of arithmetic sequences, the first item is 0, and the tolerance is 1. According to the formula of the sum of first N items of arithmetic sequence
Sn = n * a1 + n * (n – 1) * d2
Among them, a1 is the first item of the sequence, d is the tolerance.
The formula of the sum of first N natural numbers can be derived as follows:
Sn = n * a1 + n * (n – 1) * d2
= n * 0 + n * (n – 1) * 12
= n * (n – 1)2
For example, the sum of first 6 natural numbers above, use the formula to calculate:
6 * (6 – 1) 2 = 6 * 52 = 15
It is consistent with the calculation result above.
How to calculate the sum of first N even numbers
A number that can be divided by 2 is called an even number. Note that, the quotient of 0 divided by 2 is also 0, so 0 is also classified as an even number. To calculate the sum of first N even numbers, first, find out first N even numbers; then add up these even numbers to get the desired result.
For example, the sum of first 6 even numbers.
- First 6 even numbers are: 0, 2, 4, 6, 8, 10
- The sum of first 6 even numbers is: 0 + 2 + 4 + 6 + 8 + 10 = 30
Calculate the sum of first N even numbers using the formula
Obviously, even numbers are also a set of arithmetic sequences, the first item is 0, and the tolerance is 2. According to the formula of the sum of first N items of arithmetic sequence
Sn = n * a1 + n * (n – 1) * d2
Among them, a1 is the first item of the sequence, d is the tolerance.
The formula of the sum of first N even numbers can be derived as follows:
Sn = n * a1 + n * (n – 1) * d2
= n * 0 + n * (n – 1) * 22
= n * (n – 1)
So, the sum of first 6 even numbers can be calculated by the formula:
6 * (6 – 1) = 6 * 5 = 30
It is consistent with the calculation result above.
How to calculate the sum of first N odd numbers
In integers, numbers that cannot be divided by 2 are called odd numbers. Similarly, to calculate the sum of first N odd numbers, you must find out first N odd numbers first; then add up these odd numbers to get the sum result.
For example, the sum of first 6 odd numbers.
- First 6 odd numbers are: 1, 3, 5, 7, 9, 11
- The sum of first 6 odd numbers is: 1 + 3 + 5 + 7 + 9 + 11 = 36
Calculate the sum of first N odd numbers using the formula
Like even numbers, odd numbers are also a set of arithmetic sequences, the first item is 1, and the tolerance is 2. According to the formula of the sum of first N items of arithmetic sequence
Sn = n * a1 + n * (n – 1) * d2
Among them, a1 is the first item of the sequence, d is the tolerance.
The formula of the sum of first N odd numbers can be derived as follows:
Sn = n * a1 + n * (n – 1) * d2
= n * 1 + n * (n – 1) * 22
= n2
So, the sum of first 6 odd numbers can be calculated by the formula:
62 = 36
It is consistent with the calculation result above.
How to calculate the sum of first N prime numbers
A prime number is an integer that has no factors other than 1 and itself among the natural numbers greater than 1. To calculate the sum of first N prime numbers, first, find out first N prime numbers; then, add up these prime numbers to get the result.
For example, the sum of first 6 prime numbers.
- First 6 prime numbers are: 2, 3, 5, 7, 11, 13
- The sum of first 5 prime numbers is: 2 + 3 + 5 + 7 + 11 + 13 = 41
How to calculate the sum of first N composite numbers
A composite number is an integer greater than 1 that is divisible by other integers in addition to 1 and itself. To calculate the sum of first N composite numbers, first, find out first N composite numbers; then, add them together.
For example, the sum of first 6 composite numbers.
- First 6 composite numbers are: 4, 6, 8, 9, 10, 12
- The sum of first 5 composite numbers is: 4 + 6 + 8 + 9 + 10 + 12 = 49
How to use the sum of first N numbers calculator
The procedure to use the sum of first N numbers calculator is as follows:
- Enter the first N value in the first input box.
- Select data type: natural number, odd number, even number, prime number or composite number.
- Click calculate button to get the sum of first N numbers result.
- Click the Reset button to start a new calculation.
Solved examples using sum of first N numbers calculator
The sum of first N natural numbers
For example, calculate the sum of first 11 natural numbers.
Calculate by manual
First 11 natural numbers are 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 and 10. The sum of them is:
0 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10
= 55
Calculate by formula
n * (n – 1)2
= 11 * (11 – 1)2
= 11 * 102
= 55
Calculate by calculator
Enter 11 into the input box and select natural number data type, then click Calculate button, as shown in the figure, the answer is also 55.
The sum of first N even numbers
For example, calculate the sum of first 12 even numbers.
Calculate by manual
First 12 even numbers are 0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20 and 22. The sum of them is:
0 + 2 + 4 + 6 + 8 + 10 + 12 + 14 + 16 + 18 + 20 + 22
= 132
Calculate by formula
n * (n – 1)
= 12 * (12 – 1)
= 12 * 11
= 132
Calculate by calculator
Enter 12 into the input box and select even number data type, then click Calculate button, as shown in the figure, the answer is also 132.
The sum of first N odd numbers
For example, calculate the sum of first 15 odd numbers.
Calculate by manual
First 15 odd numbers are 1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27 and 29. The sum of them is:
1 + 3 + 5 + 7 + 9 + 11 + 13 + 15 + 17 + 19 + 21 + 23 + 25 + 27 + 29
= 225
Calculate by formula
n2
= 152
= 225
Calculate by calculator
Enter 15 into the input box and select odd number data type, then click Calculate button, as shown in the figure, the answer is also 225.
The sum of first N prime numbers
For example, calculate the sum of first 10 prime numbers.
Calculate by manual
First 10 prime numbers are 2, 3, 5, 7, 11, 13, 17, 19, 23 and 29. The sum of them is:
2 + 3 + 5 + 7 + 11 + 13 + 17 + 19 + 23 + 29
= 129
Calculate by calculator
Enter 10 into the input box and select prime number data type, then click Calculate button, as shown in the figure, the answer is also 129.
The sum of first N composite numbers
For example, calculate the sum of first 15 composite numbers.
Calculate by manual
First 20 composite numbers are 4, 6, 8, 9, 10, 12, 14, 15, 16, 18, 20, 21, 22, 24 and 25. The sum of them is:
4 + 6 + 8 + 9 + 10 + 12 + 14 + 15 + 16 + 18 + 20 + 21 + 22 + 24 + 25
= 224
Calculate by calculator
Enter 15 into the input box and select composite number data type, then click Calculate button, as shown in the figure, the answer is also 224.
Latest calculators
Standard Form to Slope-Intercept Form Calculator
Slope Intercept Form Calculator
Slope Calculator: Calculate Slope, X-Intercept, Y-Intercept
Reciprocal of Complex Number Calculator
Conjugate Complex Number Calculator
Modulus of Complex Number Calculator
Profit Percentage Calculator: Calculate Your Profitability Easily
Attendance and Absence Percentage Calculator
Circular Segment Radius Calculator
Regular Polygon Side Length Calculator