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 A141708 #16 Mar 20 2022 18:29:09 %S A141708 1,3,5,7,9,33,65,15,17,513,21,2047,325,27,1421,31,33,455,2553,195, %T A141708 1025,129,45,4841,1421,51,3339,165,513,6077,427,63,65,1273,2553,10437, %U A141708 73,975,231,1501,891,3735,85,3219,2047,273,93,2565,5917,99,23533,4841,1365,107 %N A141708 Least positive multiple of 2n-1 which is palindromic in base 2. %C A141708 Even numbers cannot be palindromic in base 2 (unless leading zeros are considered), that's why we search for odd numbers 2n-1 their smallest multiple k(2n-1) which is palindromic in base 2. Obviously this must always be odd. %H A141708 Harvey P. Dale, <a href="/A141708/b141708.txt">Table of n, a(n) for n = 1..1000</a> %F A141708 a(n) = (2n-1)*A141707(n). %t A141708 pal2[n_]:=Module[{k=1},While[IntegerDigits[k n,2] != Reverse[ IntegerDigits[ k n,2]],k++];k n]; pal2/@Range[1,121,2] (* _Harvey P. Dale_, Feb 29 2012 *) %o A141708 (PARI) A141708(n,L=10^9)={ n=2*n-1; forstep(k=1,L,2, binary(k*n)-vecextract(binary(k*n),"-1..1") || return(k*n))} %o A141708 (Haskell) %o A141708 a141708 n = a141707 n * (2 * n - 1) -- _Reinhard Zumkeller_, Apr 20 2015 %o A141708 (Python) %o A141708 def binpal(n): b = bin(n)[2:]; return b == b[::-1] %o A141708 def a(n): %o A141708 m = 2*n - 1 %o A141708 km = m %o A141708 while not binpal(km): km += m %o A141708 return km %o A141708 print([a(n) for n in range(1, 55)]) # _Michael S. Branicky_, Mar 20 2022 %Y A141708 Cf. A050782, A141707, A062279. %K A141708 base,easy,nice,nonn %O A141708 1,2 %A A141708 _M. F. Hasler_, Jul 17 2008