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.

A280995 a(n) is the number produced when n is converted to binary reflected Gray code, the binary digits are reversed and the code is converted back to decimal.

This page as a plain text file.
%I A280995 #238 May 22 2025 10:21:45
%S A280995 0,1,3,1,3,7,5,1,3,11,15,7,5,13,9,1,3,19,27,11,15,31,23,7,5,21,29,13,
%T A280995 9,25,17,1,3,35,51,19,27,59,43,11,15,47,63,31,23,55,39,7,5,37,53,21,
%U A280995 29,61,45,13,9,41,57,25,17,49,33,1,3,67,99,35,51,115,83,19,27,91,123,59,43
%N A280995 a(n) is the number produced when n is converted to binary reflected Gray code, the binary digits are reversed and the code is converted back to decimal.
%C A280995 a(n) = A003188(n) iff A014550(n) is palindromic.
%H A280995 Indranil Ghosh, <a href="/A280995/b280995.txt">Table of n, a(n) for n = 0..50000</a>
%e A280995 For n = 8, the binary reflected Gray code representation of n is '1100' which when reversed becomes '0011'; and 11_2 = 3_10. So, a(8) = 3.
%o A280995 (Python)
%o A280995 def a(n):
%o A280995     return int(bin(n^(n/2))[2:][::-1],2)
%Y A280995 Cf. A003188, A014550, A030101.
%K A280995 nonn,base
%O A280995 0,3
%A A280995 _Indranil Ghosh_, Jan 19 2017