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 A253147 #13 Nov 02 2024 16:02:29 %S A253147 8448,31613,32123,55255,63736,92929,96769,108801,450054,516615,995599, %T A253147 1413141,1432341,1539351,1558551,2019102,2491942,2513152,2712172, %U A253147 2731372,2750572,2807082,2838382,2857582,2876782,3097903,3740473,3866683,3885883,4201024,4220224,4327234 %N A253147 Palindromes in base 10 >= 256 that remain palindromes when the digits are reversed in base 256. %C A253147 Reversing the digits in base 256 is equivalent to reading a number in big-endian format using little-endian order with 8-bit words. See also A238853. %H A253147 Chai Wah Wu, <a href="/A253147/b253147.txt">Table of n, a(n) for n = 1..176</a> %H A253147 Wikipedia, <a href="http://en.wikipedia.org/wiki/Endianness">Endianness</a> %e A253147 2857582 is in the sequence since 2857582 is 2b 9a 6e in base 16 and 6e 9a 2b = 7248427 is a palindrome. %o A253147 (Python) %o A253147 def palgen(l, b=10): # generator of palindromes in base b of length <= 2*l %o A253147 if l > 0: %o A253147 yield 0 %o A253147 for x in range(1, l+1): %o A253147 n = b**(x-1) %o A253147 n2 = n*b %o A253147 for y in range(n, n2): %o A253147 k, m = y//b, 0 %o A253147 while k >= b: %o A253147 k, r = divmod(k, b) %o A253147 m = b*m + r %o A253147 yield y*n + b*m + k %o A253147 for y in range(n, n2): %o A253147 k, m = y, 0 %o A253147 while k >= b: %o A253147 k, r = divmod(k, b) %o A253147 m = b*m + r %o A253147 yield y*n2 + b*m + k %o A253147 def reversedigits(n, b=10): # reverse digits of n in base b %o A253147 x, y = n, 0 %o A253147 while x >= b: %o A253147 x, r = divmod(x, b) %o A253147 y = b*y + r %o A253147 return b*y + x %o A253147 A253147_list = [] %o A253147 for n in palgen(4): %o A253147 x = reversedigits(n, 256) %o A253147 if n > 255 and x == reversedigits(x, 10): %o A253147 A253147_list.append(n) %Y A253147 Cf. A253148, A253149, A238853. %K A253147 nonn,base %O A253147 1,1 %A A253147 _Chai Wah Wu_, Dec 29 2014