Square Pyramidal Number - Squares in A Square

Squares in A Square

A common mathematical puzzle involves finding the number of squares in a large n by n square grid. This number can be derived as follows:

  • The number of 1×1 boxes found in the grid is .
  • The number of 2×2 boxes found in the grid is . These can be counted by counting all of the possible upper-left corners of 2×2 boxes.
  • The number of k×k boxes (1 ≤ kn) found in the grid is . These can be counted by counting all of the possible upper-left corners of k×k boxes.

It follows that the number of squares in an n by n square grid is:

That is, the solution to the puzzle is given by the square pyramidal numbers.

The number of rectangles in a square grid is given by the squared triangular numbers.

Read more about this topic:  Square Pyramidal Number

Famous quotes containing the words squares and/or square:

    And New York is the most beautiful city in the world? It is not far from it. No urban night is like the night there.... Squares after squares of flame, set up and cut into the aether. Here is our poetry, for we have pulled down the stars to our will.
    Ezra Pound (1885–1972)

    If magistrates had true justice, and if physicians had the true art of healing, they would have no occasion for square caps; the majesty of these sciences would of itself be venerable enough. But having only imaginary knowledge, they must employ those silly tools that strike the imagination with which they have to deal; and thereby, in fact, they inspire respect.
    Blaise Pascal (1623–1662)