The class had 30 students, but a few were absent that day. The teacher gave each student present a cardboard cube and either a red or a blue marking pen, and she told each student to mark the faces of his or her cube like the faces of a die: with numbers 1 through 6 on the faces in such a manner that opposite faces add to 7. This was the only required similarity to a standard die.
The teacher gathered all the cubes and placed all the red-marked ones in one row, and all the blue-marked ones in another row. Both rows stretched from left to right and each cube had its 5 face on top and its 3 face toward the teacher.
In the red row, the sum of the digits on the left sides of the cubes was a perfect square, as was the sum of the digits on the right sides.
In the blue row, the corresponding sums were not squares, but rather prime numbers. The ratio of the larger to the smaller prime was less than 2.
How many students were absent? How many red markers and how many blue markers were handed out? What were the sums involved (the perfect squares and the primes)?
The 5/2 and 3/4 faces of the cubes as laid out in the rows described leaves 1's and 6' for the left and right sides. Assuming that at least one blue marker was handed out and that at least 2 students were away ('few' suggesting more than 1), the largest possible number of red cubes would be 27. If there were indeed 27 red cubes and all the 6's were consistently on either the left of right side, the largest possible square number less than 27 x 6 (162) would be 144. It is also possible (if not likely) however, that the students would have marked the 1's and 6's variously on either the left or right sides of the cubes, so the possible square numbers involved here likely now only range up to 121.
That started narrowing things down for me. The square numbers involved could then be described as (a x 1) + (b x 6) for one side and, since the 1's always have a 6 opposite, (b x 1) + (a x 6) for the other side. Obviously, if a were to = b, the same square number would result, and there would therefore be an even number of red cubes. It was quickly apparent that trying different numbers for a or b wasn't going to yield two different square numbers, and since 6 + 1 equals 7, applying 7 as both a and b certainly worked nicely, yielding 49 as the same square number for the sum of either the left or right sides; that is, (7 x 1) + (7 x 6) = (7 x 1) + (7 x 6) = 49, and the number of red cubes is therefore 14.
Assuming the blue blocks were now 27 - 14 = 13 or fewer, I again applied the same (a x 1) + (b x 6) and (b x 1) + (a x 6) formulae to the blue cubes, seeking prime number results for the sums. Some quick trial and error with this revealed that looking at any odd number of blue cubes always yielded one even number to the sum of the left or right sides. Prime numbers only resulted from an even number of blue cubes.
So with 13 now omitted, I started looking at 12 blue cubes. Some more quick trial and error also revealed that both the a and b numbers used had to be odd, since even numbers wouldn't yield any odd results, let alone primes! Again, some quick calculations using my formulae revealed that a = 5 and b = 7 worked perfectly, yielding 47 and 37 as the two prime number sums that still met the 'ratio less than 2' requirement. (Some quick double-checking using 10, 8 or 6 blue cubes just didn't yield anything satisfying all the required conditions!)
So, 14 red cubes (with an even split of 7 for the 1 and 6 faces, whether left side or right side), 49 for both the square number sums, 12 blue cubes, 37 and 47 for the two prime number sums, and 4 students absent!
Edited on December 9, 2008, 2:24 pm