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 A141707 #13 Mar 20 2022 18:29:16 %S A141707 1,1,1,1,1,3,5,1,1,27,1,89,13,1,49,1,1,13,69,5,25,3,1,103,29,1,63,3,9, %T A141707 103,7,1,1,19,37,147,1,13,3,19,11,45,1,37,23,3,1,27,61,1,233,47,13,1, %U A141707 21,23,59,525,5,1,93,23,41,1,1,49,27,13,187,87,269,15,111,13,29,7,1,13,3 %N A141707 Least k>0 such that (2n-1)k is palindromic in base 2. %C A141707 Even numbers cannot be palindromic in base 2 (unless leading zeros are considered), that's why we search only for odd numbers 2n-1 the k-values such that k(2n-1) is palindromic in base 2. Obviously they are necessarily also odd. %C A141707 a(A044051(n)) = 1. - _Reinhard Zumkeller_, Apr 20 2015 %H A141707 Reinhard Zumkeller, <a href="/A141707/b141707.txt">Table of n, a(n) for n = 1..10000</a> %e A141707 a(1..5)=1 since 1,3,5,7,9 are already palindromic in base 2. %e A141707 a(6)=3 since 2*6-1=11 and 2*11=22 are not palindromic in base 2, but 3*11=33 is. %t A141707 lkp[n_]:=Module[{k=1,n2=2n-1},While[IntegerDigits[k*n2,2]!= Reverse[ IntegerDigits[ k*n2,2]],k++];k]; Array[lkp,80] (* _Harvey P. Dale_, Mar 19 2016 *) %o A141707 (PARI) A141707(n,L=10^9)={ n=2*n-1; forstep(k=1,L,2, binary(k*n)-vecextract(binary(k*n),"-1..1") || return(k))} %o A141707 (Haskell) %o A141707 a141707 n = head [k | k <- [1, 3 ..], a178225 (k * (2 * n - 1)) == 1] %o A141707 -- _Reinhard Zumkeller_, Apr 20 2015 %o A141707 (Python) %o A141707 def binpal(n): b = bin(n)[2:]; return b == b[::-1] %o A141707 def a(n): %o A141707 m = 2*n - 1 %o A141707 km = m %o A141707 while not binpal(km): km += m %o A141707 return km//m %o A141707 print([a(n) for n in range(1, 80)]) # _Michael S. Branicky_, Mar 20 2022 %Y A141707 Cf. A050782, A141708, A178225, A044051. %K A141707 base,easy,nice,nonn %O A141707 1,6 %A A141707 _M. F. Hasler_, Jul 17 2008