OFFSET
1,1
LINKS
Peter J. C. Moses, Table of n, a(n) for n = 1..5000
EXAMPLE
Let n = 29. In bases 2, 3, ..., 9 the representations of 29 are 11101_2, 1002_3, 131_4, 104_5, 45_6, 41_7, 35_8, 32_9. In this list only 131_4 is a palindrome, so a(29) = 4.
MATHEMATICA
Table[FromDigits[1+Flatten[Position[Map[Reverse[#]==#&, Map[IntegerDigits[n, #]&, Range[2, 9]]], True]]], {n, 50}]
PROG
(Python)
from sympy.ntheory import digits
def c(n, b): d = digits(n, b)[1:]; return d == d[::-1]
def a(n): return int("0"+"".join(d for d in "23456789" if c(n, int(d))))
print([a(n) for n in range(1, 66)]) # Michael S. Branicky, Sep 21 2022
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Vladimir Shevelev, Jan 23 2014
EXTENSIONS
Name clarified by Jon E. Schoenfield, Sep 21 2022
STATUS
approved