Category: Number Theory Level: 101
12 = 1 × 12 = 2 × 6 = 3 × 4, 7 = 1 × 7 only
Arrange tiles into a full rectangle. Every rectangle you can build gives a factor pair. A prime number only fits in a single row.
Twelve tiles fit in one row of 12. That gives the factor pair 1 × 12. Every number has this boring rectangle.
1 × 12 = 12
Fold the row in half: 2 rows of 6, with no tile left over. So 2 and 6 are factors.
2 × 6 = 12
Three rows of 4 also fill a rectangle. Four rows of 3 is the same rectangle turned on its side, so it adds no new pair.
3 × 4 = 12
Each rectangle gives two factors. Twelve has six factors, more than two, so 12 is composite.
factors of 12: 1, 2, 3, 4, 6, 12
Seven tiles fit in one row of 7. So far 7 looks like any other number.
1 × 7 = 7
Two rows of 3 leave 1 tile over. Three rows of 2 also leave 1 over. Rows of 4, 5, or 6 fail too. The odd tile out refuses to join any rectangle.
7 = 2 × 3 + 1 = 3 × 2 + 1
The only rectangle for 7 is 1 × 7. A number whose only factors are 1 and itself is prime.
factors of 7: 1, 7 ⇒ 7 is prime
cd svg-generator python3 -m svgmath render factor-arrays --out /tmp/factor-arrays
Source: svgmath/diagrams/factors.py