A small number of standard dice were thrown. The total of the spots on the tops was a perfect square. Then the digits that represent each of the top numbers were placed in a row in increasing order to spell out a rather large number (a given digit may appear more than once, as in 12224).
The same thing was repeated with twice as many dice and again the total number of pips was a perfect square and a number formed by using the digits that represent the pips in ascending order was the square of the first number formed that way.
What were the two numbers formed by the digits representing the pips (the first number and its square)?
Define a "ramp number" as one with non-decreasing digits.
Find ramp numbers r1 and r2, s.t. sod(r1) is a square, and r2 = r1^2 is a ramp number AND r2 has twice the digits as r1.
Since r2 has twice the length of r1, r1 must be greater than √10 times whatever power of 10.
r1 digits are limited to 3,4,5,6
r2 digits are limited to 1,2,3,4,5,6
Algorithm:
Consider all d-digit numbers (when done go to d+1 digits)
Count in base 4 (from 0 to 4^d) prepending zeros to make the correct number of digits.
Add 3 to each digit. This defines all d digit base 10 numbers consisting only of the digits 3456.
Eliminate any whose sod is NOT a square.
Eliminate any which are not ramp numbers.
What gets through are r1 candidates.
For each r1 candidate:
Square it.
Eliminate any which are not ramp numbers.
Eliminate any which are not formed solely from the digits 123456.
Program output
4 16
33334 1111155556
33333334 1111111155555556
It is clear from a spreadsheet analysis that any d digit number which is a string of d-1 3s followed by a lone 4 will have a square which is d 1s then d-1 5s then a lone 6.
So all 333...334 numbers whose whose sod() is a square will be valid solutions.
The digit lengths (numbers of dice for r1) which work are:
1, 5, 8, 16, 21, 33, 40, 56, 65, ...
... which is in oeis A001082
Generalized octagonal numbers: k*(3*k-2), k=0, +- 1, +- 2, +-3, ...
So, for example, for 16 digit numbers
3333333333333334 ^2 = 11111111111111115555555555555556 is a solution
sod(3333333333333334) = 49
|
Posted by Larry
on 2025-04-25 15:58:15 |