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 A029730 #43 Feb 16 2025 08:32:35 %S A029730 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,17,34,51,68,85,102,119,136,153, %T A029730 170,187,204,221,238,255,257,273,289,305,321,337,353,369,385,401,417, %U A029730 433,449,465,481,497,514,530,546,562,578,594,610,626,642 %N A029730 Numbers that are palindromic in base 16. %H A029730 Reinhard Zumkeller, <a href="/A029730/b029730.txt">Table of n, a(n) for n = 1..10000</a> %H A029730 Patrick De Geest, <a href="http://www.worldofnumbers.com/nobase10.htm">Palindromic numbers beyond base 10</a>. %H A029730 Phakhinkon Phunphayap and Prapanpong Pongsriiam, <a href="https://doi.org/10.13140/RG.2.2.23202.79047">Estimates for the Reciprocal Sum of b-adic Palindromes</a>, 2019. %H A029730 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/PalindromicNumber.html">Palindromic Number</a>. %H A029730 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/Hexadecimal.html">Hexadecimal</a>. %H A029730 Wikipedia, <a href="http://www.wikipedia.org/wiki/Palindromic_number">Palindromic number</a>. %H A029730 Wikipedia, <a href="http://en.wikipedia.org/wiki/Hexadecimal">Hexadecimal</a>. %H A029730 <a href="/index/Pac#palindromes">Index entries for sequences related to palindromes</a> %F A029730 Sum_{n>=2} 1/a(n) = 3.71109616... (Phunphayap and Pongsriiam, 2019). - _Amiram Eldar_, Oct 17 2020 %e A029730 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F, 11, 22, 33, 44, 55, 66, 77, 88, 99, AA, BB, CC, DD, EE, FF, 101, 111, 121, 131, 141, 151, 161, 171, 181, 191,1A1, 1B1, 1C1, 1D1, 1E1, 1F1, 202, 212, 222, 232, 242, 252, 262, 272, 282, 292, 2A2, 2B2, 2C2, 2D2, 2E2, 2F2, 303, 313, 323, 333, 343, 353, 363, 373, 383, 393, 3A3, 3B3, 3C3, 3D3, 3E3, 3F3, 404, ... - _Reinhard Zumkeller_, Sep 23 2015 %t A029730 palindromicQ[n_, b_] := Module[{i = IntegerDigits[n, b]}, i == Reverse[i]]; Select[Range[1000], palindromicQ[#, 16] &] (* _Vladimir Joseph Stephan Orlovsky_, Jul 08 2009 *) %o A029730 (Haskell) %o A029730 a029730 n = a029730_list !! (n-1) %o A029730 a029730_list = map (foldr (\h v -> 16 * v + h) 0) $ %o A029730 filter (\xs -> xs == reverse xs) a262437_tabf %o A029730 -- _Reinhard Zumkeller_, Sep 23 2015 %o A029730 (PARI) isok(n) = my(v=digits(n,16)); v == Vecrev(v); \\ _Michel Marcus_, Sep 30 2018 %o A029730 (Python) %o A029730 def A029730(n): %o A029730 if n == 1: return 0 %o A029730 y = (x:=1<<(n.bit_length()-2&-4))<<4 %o A029730 return (c:=n-x)*x+int(hex(c)[-2:1:-1]or'0',16) if n<x+y else (c:=n-y)*y+int(hex(c)[-1:1:-1]or'0',16) # _Chai Wah Wu_, Jun 13 2024 %Y A029730 Cf. A029731 (also palindromic in decimal), A056962, A262437. %K A029730 nonn,base %O A029730 1,3 %A A029730 _Patrick De Geest_