login
A376860
The smallest positive number k such that the sum of the products of its digits when written in all bases 2 to n equals k, or -1 if no such number exists.
0
1, 2, -1, -1, 9, 48, 25, 118, 86, 72, 72, 258, 708, 308, 396, 273, 6766, 3386, 1824, 4488, 4488, 14061, 14061, 18270, 8451, 8451, 570519, 29502, 203294, 3628711, 245007, 361756, 647656, 49576, 802652, 1939745, 420425, 1790440, 1790440, 2174442, 2801270, 2673114, 4094198, 7522494, 4226417, 45177234, 10348312, 7157442, 1601866, 6496434, 7522933, 29818414
OFFSET
2,2
COMMENTS
For n = 3 to 54 there are no terms 1 less than a power of 2, so the base 2 product does not contribute to the sum for any of these terms. In the same range the base 3 product only contributes for n = 8, while the base 4 product contributes for n = 6, 8, 9, 10, 18, 23, 24, 31, 42.
EXAMPLE
a(6) = 9 as 9 = 1001_2 = 100_3 = 21_4 = 14_5 = 13_6, and the sum of the products of the digits in each base is 0 + 0 + 2 + 4 + 3 = 9.
a(10) = 86 as 86 = 1010110_2 = 10012_3 = 1112_4 = 321_5 = 222_6 = 152_7 = 126_8 = 105_9 = 86_10, and the sum of the products of the digits in each base is 0 + 0 + 2 + 6 + 8 + 10 + 12 + 0 + 48 = 86.
CROSSREFS
KEYWORD
sign,base
AUTHOR
Scott R. Shannon, Oct 07 2024
STATUS
approved