# The Trick for Quickly Calculating the Sum of First N Odd [[Integer Numbers]]
$
\sum_{a=0}^{n-1}(2a+1) = n^2
$
This formula can be verified visually using the following picture which shows the sum of first 5 odd numbers (in alternating gray colors from bottom to top): $1+3+5+7+9 = 25$
![[fPDO16cpCQ-group-21.svg.png|300]]
The sequence of numbers formed by this formula is known as the Square Numbers Series Sequence (1, 4, 9, 16, 25,...). It is an example of an [[Arithmetic Series]].
For more info see this Brilliant quiz: [Odd Square Sums](https://brilliant.org/practice/odd-square-sums/)
For the trick to calculate the sum of first n even numbers see [[The Trick for Quickly Calculating the Sum of First N Even Integers]].
## Proof
Proof is simply applying the formula for the arithmetic series
![[Arithmetic Series#^3b0qf5]]
$
\begin{align}
\sum_{a=0}^{n-1}(2a+1) &= \frac{n}{2}(2a_1+d(n-1)) \\
&=\frac{n}{2}(2+2(n-1)) \\
&=\frac{n}{2}(2+2n-2) \\
&=n^2
\end{align}
$