Strictly speaking it’s not base 7/2 that I’m using, because I’m allowing digits 0, 1, 2, 3, 4, 5, 6.
However, by using an exploding dots machine, we can represent positive integers in the form
where
and each
.
Here,
So just as for sesquinary palindromes, in which the digits of a palindrome, base 3/2, read the same backwards as forwards, we can look for palindromes base 7/2.
The following Mathematica code produces the base 7/2 digits of a positive integer:
SevenToTwoDigits[n0_] := Module[{n = n0}, digits = {};
While[n >= 7, digits = Prepend[digits, 7*FractionalPart[n/7]];
n = 2*IntegerPart[n/7]];
digits = Prepend[digits, n]]
For example,
SevenToTwoDigits[373]
gives {2, 1, 2, 1, 2}, so the base 10 number 373 is palindromic base 7/2.
There aren’t many sesquinary palindromes, so how many palindromes base 7/2 are there?
Gobs and gobs!
Here’s how we can find base 7/2 palindromes up to 100000:
L = {};
While[n <= 100000,
If[SevenToTwoDigits[n] == Reverse[SevenToTwoDigits[n]], L = {L, n}];
n++]
L = Flatten[L]
This gives us the following 115 numbers (written base 10) up to 100000 that are base 7/2 palindromes:
{1, 2, 3, 4, 5, 6, 9, 18, 27, 30, 37, 44, 53, 60, 67, 74, 83, 90, 97, 135, 207, 270, 279, 342, 373, 422, 478, 534, 583, 641, 697, 746, 802, 851, 907, 956, 965, 1014, 1070, 1119, 1175, 1206, 2151, 2160, 2412, 3357, 3366, 3618, 4293, 5028, 5224, 5427, 5966, 6162, 6365, 6904, 7100, 7296, 7648, 7844, 8383, 8586, 8782, 9321, 9517, 9720, 10455, 10658, 10854, 11393, 11589, 11941, 12137, 12879, 13075, 13271, 13810, 14013, 14209, 14748, 26856, 27738, 28620, 30195, 31077, 31959, 32841, 34416, 35298, 36180, 37755, 38637, 39519, 40401, 51627, 58879, 69225, 69911, 72508, 73194, 76477, 77163, 78395, 79081, 81678, 82364, 85647, 86333, 88930, 89616, 93398, 94084, 94770, 97367, 98053}
Up to 1000000 there are 197 positive integers that are base 7/2 palindromes.
The relative abundance of base 7/2 palindromes has to have something to do with the distance 5=7-2 between 7 and 2, but I’m not sure what yet. Any clues?