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.
%I A249158 #19 Sep 23 2024 14:17:59 %S A249158 0,1,2,3,4,5,6,8,16,24,150,300,5952,7752,7955,9755,9958,11904,13704, %T A249158 13907,14110,15707,15910,392850,751043,4585544,12737804,12828748, %U A249158 16380296,19289406,19380350,20228253,33115710,395849700,1339182534 %N A249158 Palindromic in bases 7 and 29. %H A249158 Ray Chandler, <a href="/A249158/b249158.txt">Table of n, a(n) for n = 1..80</a> (terms < 10^18) %H A249158 Attila Bérczes and Volker Ziegler, <a href="http://arxiv.org/abs/1403.0787">On Simultaneous Palindromes</a>, arXiv:1403.0787 [math.NT], 2014. %e A249158 150 is a term since 150 = 303 base 7 and 150 = 55 base 27. %t A249158 palQ[n_Integer,base_Integer]:=Block[{idn=IntegerDigits[n,base]},idn==Reverse[idn]];Select[Range[10^6]-1,palQ[#,7]&&palQ[#,29]&] %o A249158 (Python) %o A249158 from gmpy2 import digits %o A249158 def palQ(n, b): # check if n is a palindrome in base b %o A249158 s = digits(n, b) %o A249158 return s == s[::-1] %o A249158 def palQgen(l, b): # unordered generator of palindromes in base b of length <= 2*l %o A249158 if l > 0: %o A249158 yield 0 %o A249158 for x in range(1, b**l): %o A249158 s = digits(x, b) %o A249158 yield int(s+s[-2::-1], b) %o A249158 yield int(s+s[::-1], b) %o A249158 A249158_list = sorted([n for n in palQgen(8,7) if palQ(n,29)]) %o A249158 # _Chai Wah Wu_, Nov 25 2014 %Y A249158 Cf. A007632, A060792, A249155, A249156, A249157. %K A249158 nonn,base %O A249158 1,3 %A A249158 _Ray Chandler_, Oct 27 2014