Consecutive numbers are numbers that follow each other in order with a difference of 1 between every two numbers. In a set of consecutive integers, the mean and the median are equal. If n is an integer, then n, n+1 and n+2 would be consecutive integers. Below Adding Consecutive Squares Chart shows the sum of consecutive squares from 1 to 100. For example: Consider adding consecutive squares of numbers from 1 to 6. The result is given by 1^{2}+2^{2}+3^{2}+4^{2}+5^{2}+6^{2} = 91.

The sum of consecutive squares of n numbers is, 1 + 4 + 9 + ... + n^{2}, which is called the nth square pyramidal number. If S(n) is the nth square pyramidal number, then S(n) is expressed as:
S(n) = 1 + 4 + 9 + ... + (n-1)^{2} + n^{2}.