login
A375350
a(n) is the smallest number k such that the sum of the bases less than k-1, for which k is palindromic, equals n . If no such number exists, a(n) = -1.
0
5, 8, 25, 12, 14, 10, 89, 107, 16, 67, 20, 18, 109, 331, 187, 227, 95, 157, 26, 409, 28, 24, 45, 191, 65, 241, 58, 85, 57, 44, 161, 299, 63, 62, 401, 42, 40, 337, 50, 36, 74, 56, 99, 52, 94, 1129, 86, 145, 129, 54, 68, 64, 1613, 76, 48, 1073, 175, 533, 559, 341
OFFSET
2,1
EXAMPLE
a(7) = 10, because 10 is palindromic in bases 3 (as 101) and 4 (as 22), which are both less than 9. The sum of these bases (3 + 4) is 7, and no smaller number has this property.
Table begins:
a(2) = 5 = 101_2,
a(3) = 8 = 22_3,
a(4) = 25 = 121_4,
a(5) = 12 = 22_5,
a(6) = 14 = 22_6,
a(7) = 10 = 101_3 = 22_4,
a(8) = 89 = 131_8,
a(9) = 107 = 1101011_2 = 212_7,
a(10) = 16 = 121_3 = 22_7,
PROG
(PARI) isok(k, n) = my(s=0); for(b=2, k-2, my(d=digits(k, b)); if (d == Vecrev(d), s += b)); s == n;
a(n) = my(k=1); while (!isok(k, n), k++); k; \\ Michel Marcus, Aug 14 2024
KEYWORD
nonn,base
AUTHOR
Jean-Marc Rebert, Aug 14 2024
STATUS
approved