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”).
%I #28 Aug 12 2024 13:41:38
%S 1,2,3,4,5,6,7,8,9,10,15,16,17,18,20,21,24,26,27,28,31,33,36,40,45,46,
%T 50,51,52,55,57,63,65,67,73,78,80,82,85,88,91,92,93,98,99,100,104,105,
%U 107,109,111,114,119,121,127,129,130,135,141,142,150,151,154,160,164,170,171,173,178
%N Integers which are palindromes when expressed in more than one base 2 to 10.
%C Sequence is infinite because all integers of the form 4^n-1 are palindromic in bases 2 and 4.
%F A050812(a(n)) >= 2. - _Michael S. Branicky_, Aug 02 2024
%e 5 is a term since it's palindromic in more than one base: base 2 (101) and base 4 (11).
%e 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.
%t q[n_] := Count[Range[2, 10], _?(PalindromeQ[IntegerDigits[n, #]] &)] > 1; Select[Range[180], q] (* _Amiram Eldar_, Jul 20 2024 *)
%o (Python)
%o from sympy.ntheory import is_palindromic
%o def ok(n):
%o c = 0
%o for b in range(2, 11):
%o c += int(is_palindromic(n, b))
%o if c > 1: return True
%o return False
%o print([k for k in range(1, 180) if ok(k)]) # _Michael S. Branicky_, Aug 02 2024
%o (PARI) isok(k) = sum(b=2, 10, my(v=digits(k, b)); v==Vecrev(v)) > 1; \\ _Michel Marcus_, Aug 03 2024
%Y Cf. A050812, A253594.
%K base,easy,nonn
%O 1,2
%A _Paul Duckett_, Jul 11 2024