|
|
A329254
|
|
Smallest palindrome k, not less than n, such that k is also a palindrome in base n.
|
|
1
|
|
|
1, 3, 4, 5, 6, 7, 8, 9, 191, 11, 232, 181, 222, 323, 828, 353, 252, 171, 666, 252, 22, 161, 737, 525, 494, 989, 252, 232, 929, 434, 1551, 33, 272, 525, 252, 111, 494, 585, 5775, 656, 252, 989, 44, 585, 414, 141, 2112, 343, 3333, 969, 676, 212, 5885, 55, 616
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,2
|
|
COMMENTS
|
a(10^k) = 10^k+1 for k > 0. Conjecture: a(n) in base n has 3 or fewer digits. - Chai Wah Wu, Nov 17 2019
|
|
LINKS
|
|
|
EXAMPLE
|
For n=9, 191_10 = 232_9.
|
|
MATHEMATICA
|
Flatten@{1, Table[k = n; While[! PalindromeQ[k] || k != IntegerReverse[k, n], k++ ]; k, {n, 2, 200}]}
|
|
PROG
|
(PARI) ispal(k, b) = { my(d=digits(k, b)); d == Vecrev(d); }
a(n) = {if (n == 1, return(1)); my(k=n); while (!ispal(k, 10) || ! ispal(k, n), k++); k; } \\ Michel Marcus, Nov 18 2019
|
|
CROSSREFS
|
Cf. A002113 (palindromes in base 10).
|
|
KEYWORD
|
nonn,base
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|