WOLFRAM|DEMONSTRATIONS PROJECT

What Squares Are in the Square Grid?

​
squares
rectangles
n
1
2
3
4
5
next
1 of 14
Given a square grid of size
n×n
, this Demonstration shows each of its grid subsquares or grid subrectangles. The formula enumerating subsquares is
n(n+1)(2n+1)/6
. The formula enumerating subrectangles is
2
(n(n+1)/2)
.