OFFSET
0,1
LINKS
T. D. Noe, Table of n, a(n) for n = 0..10000
Patrick De Geest, Palindromic numbers beyond base 10
EXAMPLE
a(121) = 4 since 121_10, 171_8, 232_7 and 11111_3 are palindromes.
MATHEMATICA
Table[Count[Table[IntegerDigits[n, b], {b, 2, 10}], _?(#==Reverse[#]&)], {n, 0, 90}] (* Harvey P. Dale, Aug 18 2012 *)
PROG
(Python)
from sympy.ntheory.digits import digits
def ispal(n, b):
digs = digits(n, b)[1:]
return digs == digs[::-1]
def a(n): return sum(ispal(n, b) for b in range(2, 11))
print([a(n) for n in range(87)]) # Michael S. Branicky, Sep 09 2021
(PARI) a(n) = sum(b=2, 10, my(d=digits(n, b)); d == Vecrev(d)); \\ Michel Marcus, Sep 09 2021
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Patrick De Geest, Oct 15 1999
STATUS
approved