login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A050812 Number of times n is palindromic in bases b, 2 <= b <= 10. 8
9, 9, 8, 8, 7, 7, 5, 5, 4, 3, 3, 1, 1, 1, 1, 2, 2, 2, 2, 0, 2, 3, 1, 1, 2, 1, 2, 2, 2, 1, 1, 2, 1, 2, 1, 1, 2, 1, 1, 0, 3, 1, 1, 1, 1, 2, 2, 0, 1, 1, 2, 2, 2, 0, 1, 3, 1, 2, 0, 1, 1, 1, 1, 3, 1, 3, 1, 2, 1, 0, 1, 1, 1, 2, 1, 0, 0, 1, 2, 0, 3, 1, 2, 1, 0, 3 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,1
LINKS
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
Sequence in context: A304029 A019896 A175570 * A139345 A231470 A109942
KEYWORD
nonn,base
AUTHOR
Patrick De Geest, Oct 15 1999
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 25 06:49 EDT 2024. Contains 371964 sequences. (Running on oeis4.)