I have code to generate this image:
But my code is awkward and clunky:
Graphics[
{
Hue[3/5], EdgeForm[Thin],
Table[Rectangle[{x, 0}, {x + 24, 1}], {x, 0, 0, 24}],
Table[Rectangle[{x, 1}, {x + 12, 2}], {x, 0, 12, 12}],
Table[Rectangle[{x, 2}, {x + 8, 3}], {x, 0, 16, 8}],
Table[Rectangle[{x, 3}, {x + 6, 4}], {x, 0, 18, 6}],
Table[Rectangle[{x, 4}, {x + 4, 5}], {x, 0, 20, 4}],
Table[Rectangle[{x, 5}, {x + 3, 6}], {x, 0, 21, 3}],
Table[Rectangle[{x, 6}, {x + 2, 7}], {x, 0, 22, 2}],
Table[Rectangle[{x, 7}, {x + 1, 8}], {x, 0, 23, 1}]
}
]
Using as many Table[]s as there are divisors is ridiculous. I'd like to just Map Rectangle onto the appropriate corners, like here, but I can't generate the appropriate lists. I'm also curious about a Table of Tables approach, but I can't generate that, either. Out of curiosity, why is the functional approach preferable to a Table of Tables? I appreciate the help.