1. How many n-digit decimal integers have all digits 1, 2 or 3. How many also contain each of 1, 2, 3 at least once?
2. Prove that 5n + 2 3n-1 + 1 = 0 (mod 8).
3. ABCD is a quadrilateral with vertices in that order. Prove that AC is perpendicular to BD iff AB2 + CD2 = BC2 + DA2.
Solutions
Problem 1
How many n-digit decimal integers have all digits 1, 2 or 3. How many also contain each of 1, 2, 3 at least once?
Solution
3 choices for each digit, so 3n in all.
We must exclude the 2n with all digits 1 or 2, and the 2n with all digits 2 or 3, and the 2n with all digits 1 or 3. But then we exclude twice those with all digits 1, all digits 2 and all digits 3. Hence 3n - 3·2n + 3.
Problem 2
Prove that 5n + 2 3n-1 + 1 = 0 (mod 8).
Solution
If n is even, 5n = 1 mod 8, 3n-1 = 3 mod 8, so expression = 1 + 6 + 1 = 0 mod 8. If n is odd, then 5n = 5 mod 8, 3n-1 = 1 mod 8, so expression = 5 + 2 + 1 = 0 mod 8.
Problem 3
ABCD is a quadrilateral with vertices in that order. Prove that AC is perpendicular to BD iff AB2 + CD2 = BC2 + DA2.
Solution
Let the diagonals intersect at O and put ∠AOB = x. Then AB2 = OA2 + OB2 - 2·OA·OB cos x, CD2 = OC2 + OD2 - 2·OC·OD cos x. So AB2 + CD2 = OA2 + OB2 + OC2 + OD2 - 2 cos x (OA·OB + OC·OD). Similarly, BC2 + DA2 = OA2 + OB2 + OC2 + OD2 + 2 cos x (OA·OD + OB·OC). Thus if x = 90o, then cos x = 0 and AB2 + CD2 = BC2 + DA2. But if x ≠ 90o, then cos x ≠ 0 and so AB2 + CD2 and BC2 + DA2 are on opposite sides of OA2 + OB2 + OC2 + OD2 and hence unequal.
