OFFSET
1,2
COMMENTS
Sequence is infinite because all integers of the form 4^n-1 are palindromic in bases 2 and 4.
FORMULA
A050812(a(n)) >= 2. - Michael S. Branicky, Aug 02 2024
EXAMPLE
5 is a term since it's palindromic in more than one base: base 2 (101) and base 4 (11).
121 is a term since it's palindromic in base 3 (11111) and base 7 (232), and also in fact in bases 8 and 10.
MATHEMATICA
q[n_] := Count[Range[2, 10], _?(PalindromeQ[IntegerDigits[n, #]] &)] > 1; Select[Range[180], q] (* Amiram Eldar, Jul 20 2024 *)
PROG
(Python)
from sympy.ntheory import is_palindromic
def ok(n):
c = 0
for b in range(2, 11):
c += int(is_palindromic(n, b))
if c > 1: return True
return False
print([k for k in range(1, 180) if ok(k)]) # Michael S. Branicky, Aug 02 2024
(PARI) isok(k) = sum(b=2, 10, my(v=digits(k, b)); v==Vecrev(v)) > 1; \\ Michel Marcus, Aug 03 2024
CROSSREFS
KEYWORD
base,easy,nonn
AUTHOR
Paul Duckett, Jul 11 2024
STATUS
approved