Skip to main content

Consecutive Integers Calculator

Free Consecutive integers Calculator for arithmetic. Enter values to get step-by-step solutions with formulas and graphs.

Reviewed by Manoj Kumar, Mathematics Educator

Reviewed by Manoj Kumar, Mathematics Educator

Formula

Sum = n * first + n(n-1)/2 * step

The sum of n consecutive integers (or consecutive even/odd integers) starting at the first term, with a step of 1 for consecutive or 2 for even/odd. The first term can be found from a target sum: first = (Sum - n(n-1)/2 * step) / n.

Worked Examples

Example 1: Find 5 Consecutive Integers Summing to 45

Problem:Find five consecutive integers whose sum equals 45.

Solution:Let the integers be n, n+1, n+2, n+3, n+4.\nSum = 5n + (0+1+2+3+4) = 5n + 10 = 45\n5n = 35\nn = 7\nThe integers are 7, 8, 9, 10, 11.\nVerification: 7 + 8 + 9 + 10 + 11 = 45. Correct.\nAlternative formula: first = (45 - 5*4/2) / 5 = 35/5 = 7.

Result:The five consecutive integers are 7, 8, 9, 10, 11.

Example 2: Sum of Consecutive Odd Integers

Problem:Find 4 consecutive odd integers whose sum equals 56.

Solution:Let the integers be n, n+2, n+4, n+6 (step of 2 for odd).\nSum = 4n + (0+2+4+6) = 4n + 12 = 56\n4n = 44\nn = 11\nThe integers are 11, 13, 15, 17.\nVerification: 11 + 13 + 15 + 17 = 56. Correct.\nUsing the formula: first = (56 - 4*3/2 * 2) / 4 = (56 - 12) / 4 = 11.

Result:The four consecutive odd integers are 11, 13, 15, 17.

Frequently Asked Questions

What are consecutive integers?

Consecutive integers are whole numbers that follow each other in order, with each number exactly 1 more than the previous one. Examples include 1, 2, 3, 4, 5 or -3, -2, -1, 0, 1. Any set of consecutive integers can be represented algebraically as n, n+1, n+2, n+3, and so on, where n is the first integer in the sequence. Consecutive integers are fundamental in number theory and appear frequently in mathematical problem-solving, especially in algebra word problems. The concept extends to consecutive even integers (like 2, 4, 6, 8) and consecutive odd integers (like 1, 3, 5, 7), where the step between terms is 2 instead of 1.

How do you find consecutive integers that sum to a given number?

To find n consecutive integers that sum to a target S, use the formula: first integer = (S - n(n-1)/2) / n. This works because the sum of n consecutive integers starting at a is na + n(n-1)/2. Rearranging for a gives the starting integer. For example, to find 5 consecutive integers summing to 45: a = (45 - 5*4/2) / 5 = (45 - 10) / 5 = 7. So the integers are 7, 8, 9, 10, 11, and indeed 7+8+9+10+11 = 45. The solution exists as integers only when (S - n(n-1)/2) is divisible by n. Not every combination of target sum and count produces an integer solution.

What is the Gauss formula for summing consecutive integers?

The Gauss formula states that the sum of the first n positive integers is n(n+1)/2. Legend has it that young Carl Friedrich Gauss discovered this when his teacher asked the class to add numbers from 1 to 100. Gauss noticed that pairing numbers from opposite ends (1+100, 2+99, 3+98, etc.) each gives 101, and there are 50 such pairs, so the sum is 50 times 101 = 5,050. More generally, the sum of consecutive integers from a to b is (b-a+1)(a+b)/2, which equals the count of terms times the average of the first and last terms. This formula is one of the most frequently used results in mathematics and computer science.

Can every positive integer be written as a sum of consecutive integers?

Almost every positive integer can be written as a sum of two or more consecutive positive integers, with the sole exceptions being powers of 2. Numbers like 1, 2, 4, 8, 16, 32, and 64 cannot be expressed as sums of consecutive positive integers. This is because if n consecutive integers starting at a sum to S, then S = n(2a + n - 1)/2, which means S has an odd factor. Powers of 2 have no odd factors greater than 1. Every odd number greater than 1 can be written as a sum of two consecutive integers. For composite odd numbers, there are usually multiple ways to decompose them. The number of representations relates to the number of odd divisors of the target sum.

References

Reviewed by Manoj Kumar, Mathematics Educator ยท Editorial policy