cp's OEIS Frontend

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.

A154810 Nonpalindromic numbers with binary digits only.

This page as a plain text file.
%I A154810 #18 Jul 24 2024 17:33:44
%S A154810 10,100,110,1000,1010,1011,1100,1101,1110,10000,10010,10011,10100,
%T A154810 10110,10111,11000,11001,11010,11100,11101,11110,100000,100010,100011,
%U A154810 100100,100101,100110,100111,101000,101001,101010,101011,101100,101110,101111
%N A154810 Nonpalindromic numbers with binary digits only.
%C A154810 A154809 written in base 2.
%H A154810 Paolo Xausa, <a href="/A154810/b154810.txt">Table of n, a(n) for n = 1..10000</a>
%F A154810 a(n) = A007088(A154809(n)). - _Michel Marcus_, Jul 24 2024
%t A154810 Map[FromDigits, Select[IntegerDigits[Range[50], 2], !PalindromeQ[#] &]] (* _Paolo Xausa_, Jul 24 2024 *)
%o A154810 (Python)
%o A154810 def A154810(n):
%o A154810     def f(x): return n+(x>>(l:=x.bit_length())-(k:=l+1>>1))-(int(bin(x)[k+1:1:-1],2)>(x&(1<<k)-1))+(1<<k-1+(l&1^1))-1
%o A154810     m, k = n, f(n)
%o A154810     while m != k:
%o A154810         m, k = k, f(k)
%o A154810     return int(bin(m)[2:]) # _Chai Wah Wu_, Jul 24 2024
%Y A154810 Cf. A007088, A029742, A057148, A154809.
%K A154810 easy,nonn,base
%O A154810 1,1
%A A154810 _Omar E. Pol_, Jan 24 2009
%E A154810 Extended by _Ray Chandler_, Mar 14 2010