Every positive integer cube n³ is the sum of exactly n consecutive positive odd numbers. Enter the integer n to find the first term, last term and sum. Start with the first term and add 2 repeatedly until you reach the last term.

Enter n, the positive integer being cubed, rather than the cube itself. For 125 = 5³, enter 5. The results are first term 21, last term 29 and term count 5: 21 + 23 + 25 + 27 + 29 = 125.

Use whole numbers from 1 to 100,000. This bound keeps the integer calculations within the exact-integer range of standard numeric arithmetic. Fractional inputs do not describe a count of odd terms, even if arithmetic results appear. Zero and negative inputs are outside this calculator’s scope. An unavailable result is not zero; correct the input before interpreting it.

\[a=n^2-n+1,\qquad b=n^2+n-1,\qquad n^3=\sum_{k=0}^{n-1}(n^2-n+1+2k),\quad n\in\mathbb{Z}_{>0}\]

The product n(n − 1) is even, so the first term n(n − 1) + 1 is odd. Adding 2 preserves oddness, and after n − 1 additions the last term is n² + n − 1.

The average of the first and last terms is n². An arithmetic sequence has sum equal to its term count times that average, so these n terms sum to n × n² = n³.

The first term is also uniquely determined when the count is fixed at n: a sequence starting at a has sum n(a + n − 1). Setting that sum equal to n³ gives a = n² − n + 1.

Examples of cubes as sums of consecutive odd numbers
nFirst termLast termSum
1111 = 1³
2353 + 5 = 8 = 2³
37117 + 9 + 11 = 27 = 3³
4131913 + 15 + 17 + 19 = 64 = 4³
5212921 + 23 + 25 + 27 + 29 = 125 = 5³
109110991 + 93 + … + 109 = 1000 = 10³
Is this the same as adding the first n odd numbers?

No. The first n positive odd numbers sum to n². To obtain n³ using exactly n consecutive odd numbers, start at n² − n + 1.

What happens when n is 1?

There is one term, 1. The first and last terms are both 1, and their one-term sum is 1³ = 1.

Can the same cube have another consecutive-odd-number representation?

Yes, if a different number of terms is allowed. For example, 27 is both 7 + 9 + 11 and the single odd term 27. This calculator finds the representation containing exactly n terms for n³.

Thumbnail image creation is required: no registered thumbnail asset was supplied. Before activation, create and register a 400 × 400 pixel WebP thumbnail, then add it as the first image block using its assigned asset ID. Inspect neighboring thumbnails for style. Use the cheerful yellow five-point star mascot with hands and no separate legs or feet, a white background, and playful navy, blue and teal graphics illustrating 21 + 23 + 25 + 27 + 29 = 125. Renderer integration and functional QA are required before activation.

Cute yellow star mascot illustrating Integer Cube as Consecutive Odd Numbers Calculator.
· AI-generated with OpenAI image generation