Devise an algorithm to mentally divide any base ten (decimal) integer from 1 to 30 by 31.
For integer 0 < n < 31, n/31 is a repeating decimal with a period of 15. There are two versions of the cyclic pattern with half of the numerators from 1 to 30 using Pattern One and the other half using Pattern Two.
Pattern One is typified by 1/31, the digits are in this sequence:
0, 3, 2, 2, 5, 8, 0, 6, 4, 5, 1, 6, 1, 2, 9
Pattern Two is typified by 1/31, the digits are in this sequence:
0, 9, 6, 7, 7, 4, 1, 9, 3, 5, 4, 8, 3, 8, 7
Each pair of digits, for example '03', '32', '22' looking at the beginning of Pattern One occurs only once. No pair that is in Pattern One is also in Pattern Two. Of the 100 possible patterns for 2 digits, only 30 of these patterns appear, 3 for each "decade".
If one were to memorize both Pattern One and Pattern Two, similar to how we all know 1,4,2,8,5,7 for 1/7, and then also memorize the starting 2 digits of n/31, for each n, then one would be able to do it.
This depends heavily on memorization, so I'm not sure this is the intended solution.

Posted by Larry
on 20230320 12:14:12 