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.

Share this calculator

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.

How are consecutive integers used in algebra word problems?

Consecutive integer problems are among the most common algebra word problems. The typical setup describes unknown integers with a relationship between them. For three consecutive integers, set them as x, x+1, x+2. For consecutive even or odd integers, use x, x+2, x+4. Then translate the word problem into an equation. For example, if three consecutive integers sum to 78, the equation is x + (x+1) + (x+2) = 78, giving 3x + 3 = 78, so x = 25, and the integers are 25, 26, 27. These problems teach students to translate verbal descriptions into algebraic expressions and develop systematic problem-solving skills that apply to more complex mathematical situations.

What is the sum of squares of consecutive integers?

The sum of squares of the first n positive integers has a closed-form formula: n(n+1)(2n+1)/6. For example, the sum 1 squared plus 2 squared plus 3 squared plus 4 squared plus 5 squared equals 1+4+9+16+25 = 55, which matches 5(6)(11)/6 = 55. For consecutive integers from a to b, the sum of squares equals the sum from 1 to b minus the sum from 1 to a-1. This formula appears frequently in statistics (variance calculations), physics (moment of inertia), and computer science (algorithm analysis). The sum of cubes of the first n integers is [n(n+1)/2] squared, which is remarkably the square of the sum formula, a beautiful identity known as Nicomachus theorem.

References