1996 AIME Problem 14
Problem 14 of 15HarderGeometryNumber TheoryCombinatorics
A rectangular solid is made by gluing together cubes. An internal diagonal of this solid passes through the interiors of how many of the cubes?
Your answer
Integer from 0 to 999
Show solution
Solution
For an array, the diagonal crosses and internal grid planes of the three orientations. Crossings of two orientations coincide and times, and triple crossings occur times. Adding one for the initial cube and applying inclusion-exclusion gives Here the pairwise gcds are and and the triple gcd is Thus the number of cube interiors met is
Tagged: rectangular prism · inclusion-exclusion · greatest common divisor