cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A374561 Integers which are palindromes when expressed in more than one base 2 to 10.

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