login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

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
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
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).
Sequence in context: A037351 A293727 A077528 * A359003 A183296 A138928
KEYWORD
nonn,base
AUTHOR
Robert Price, Nov 09 2019
STATUS
approved