Every prime is a tree. Every number is a forest whose trees correspond to the primes its prime factorization. The tree for 2 is a single vertex. The tree for any other prime is a root vertex connected to the forest representing your prime’s place in the list of all primes. (e.g., 7 is the 4th prime, so you create a root vertex and connect it to the representation for 4.)
Each prime number has it’s own tree and we simply put these trees together to represent multiplication. So, once we know what the trees look like for 3 and 7 we can put them next to each other to make 21.
To find out what the tree looks like for a prime, we build it recursively using the number of primes less than or equal to our prime. To start off with, 2 is just a dot (*).
2: *
To make the tree for 3 we note that there are 2 primes less than or equal to 3, so we take the tree for 2 and connect it to another * like so:
3:
*

*
To make 4 we first prime factor 4 as 2*2 and then put the trees next to each other.
4: * *
To make 7 we note that there are 4 primes less than or equal to 7, so we take the forest for 4 and connect it to a root.
7:
* *
\ /
*
Now we can make the tree for 21 = 3*7.
21:
* * *
 \ /
* *
So basically you can recursively define each number using prime factorization and the number of primes less than or equal to a prime. Note that the function that gives this number is called π(x) (that is, ‘pi of x’).
“Here is an old favorite of mine that completely stumped me once when I was a student,” writes Jeff Hooper in Crux Mathematicorum. Suppose that each square in this 3×7 grid is painted red or black at random. Show that the board must contain a rectangle whose four corner squares are all the same color.
Each column contains 3 squares, so each of the 7 columns must contain 2 squares of the same color. There are 3 ways to position 2 black squares in a column, and 3 ways to position 2 red squares, for 6 possibilities overall. Since there are 7 columns in the grid, some 2 of them must bear the same pattern, and thus there are 2 different columns that each contain 2 squares with the same color and position. These form the corners of a rectangle.
Suppose that the task is possible, and that we’ve done it. Due to their shape, each of our 25 tiles contains either 1 or 3 black chessboard squares, always an odd number. So, taken together, the tiles contain an odd number of black squares. But the original board contained 100/2 = 50 black squares. That’s a contradiction, so the task is not possible.
A problem from the Stanford University Competitive Examination in Mathematics:
How old is the captain, how many children has he, and how long is his boat? Given the product 32118 of the three desired numbers (integers). The length of the boat is given in feet (is several feet), the captain has both sons and daughters, he has more years than children, but he is not yet one hundred years old.
Of these possibilities, only the first includes two factors in the range from 4 (the minimum number of children) to 99 (the captain’s maximum age). So the captain has 6 children, he’s 53 years old, and his boat is 101 feet long.
“A farmer, being asked what number of animals he kept, answered: ‘They’re all horses but two, all sheep but two, and all pigs but two.’ How many had he?”
11/09/2023 UPDATE: There’s another solution: Possibly he has no horses, sheep, or pigs but two llamas (or any other sort of animal). That works too. (Thanks, Gareth and Bob.)
Can you complete the ‘selfdescriptive crossword puzzle’ at left below? As in the solution to a similar puzzle seen at right, each of its 13 entries, 6 horizontal, 7 vertical, consists of an English number name folowed by a space followed by a distinct letter. The number preceding each letter describes the total number of occurrences of the letter in the completed puzzle. Hence, in the example, E occurs thirteen times, G only once, and so on, as readers can check. Note that the selfdescription is complete; every distinct letter is counted.
Though far from easy, the selfdescriptive property of the crossword enables its solution to be inferred from its empty grid using reasoning based on orthography only.
A puzzle by James M., an operations researcher at the National Security Agency:
Frosty the Snowman wants to create a small snowman friend for himself. The new snowman needs a base, torso, and a head, all three of which should be spheres. The torso should be no larger than the base and the head should be no larger than the torso.
For building material, Frosty has a spherical snowball with a 6inch radius. Since Frosty likes to keep things simple, he also wants the radius of each of the three pieces to be a positive integer. Can Frosty accomplish this?
Yes! The formula for the volume of a sphere with radius r is . Let a, b and c be the radii of the base, torso, and head, respectively, which are integers greater than 0. The problem then amounts to Frosty solving the equation
By canceling out the factor of from both sides, we’re left with
As stated in the problem, a ≥ b ≥ c. The biggest that a can be is 5, so let’s try that first. Subtracting 5^{3} = 125 from both sides gives us
The biggest that b can be is 4, so let’s try that next. Subtracting 4^{3} = 64 from both sides gives us
Frosty is in luck, since 3^{3} = 27. Thus we have that 6^{3} = 5^{3} + 4^{3} + 3^{3}. Now Frosty can build his new snowman friend to his specifications. In fact, (5, 4, 3) is the only combination of numbers that will work.
A blackleg passing through a town in Ohio, bought a hat for $8 and gave in payment a $50 bill. The hatter called on a merchant near by, who changed the note for him, and the blackleg having received his $42 change went his way. The next day the merchant discovered the note to be a counterfeit, and called upon the hatter, who was compelled forthwith to borrow $50 of another friend to redeem it with; but on turning to search for the blackleg he had left town, so that the note was useless on the hatter’s hands. The question is, what did he lose — was it $50 besides the hat, or was it $50 including the hat?
This is not so much a puzzle as a perplexity. “[I]n almost every case the first impression is, that the hatter lost $50 besides the hat, though it is evident he was paid for the hat, and had he kept the $8 he needed only to have borrowed $42 additional to redeem the note.”
A puzzle by Edward J. Barbeau, from the February 2007 issue of Crux Mathematicorum:
A certain familiar island is inhabited by knights, who can only speak the truth, and knaves, who can only lie. One day a visitor meets three inhabitants, A, B, and C. The visitor asked, “How many knights are there among you three?”
A gave an answer, which the visitor didn’t hear. When the visitor asked B what A had said, B replied, “A said that there is one knight among us.” At this C said, “Don’t believe B. He is lying.”
This solution is by Mandy Rodgers and Josh Trejo. C accuses B of lying, so they can’t both be knights or both knaves. Assume first that B is a knight and C is a knave. That would mean that A really did tell the visitor that there was one knight among the three islanders. But if A’s statement were true then both A and B would be knights, which is a contradiction; and if A’s statement were false then B really would be the only knight, which again is a contradiction. So B can’t be a knight. That means that B is a knave, which makes C a knight.
Note that we don’t know whether A is a knight or a knave. It’s possible that he’s a knight and said that the trio includes two knights, which would be true (in this case A/B/C are knight/knave/knight). And it’s possible that he’s a knave and said that all three were knights or all knaves, both of which statements we know are false. These possibilities are both selfconsistent, so we can’t say anything about A’s identity, only that B lies and C tells the truth.