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.

A281379 Numbers which are palindromic in their binary reflected Gray code representation.

This page as a plain text file.
%I A281379 #13 Jun 13 2025 18:17:02
%S A281379 0,1,2,5,6,10,14,18,21,25,30,34,42,54,62,66,77,85,90,102,105,113,126,
%T A281379 130,146,170,186,198,214,238,254,258,285,301,306,330,341,357,378,390,
%U A281379 409,425,438,462,465,481,510,514,546,594,626,650,682,730,762,774,806,854,886,910,942
%N A281379 Numbers which are palindromic in their binary reflected Gray code representation.
%C A281379 A281378 is a subsequence of this sequence.
%H A281379 Indranil Ghosh, <a href="/A281379/b281379.txt">Table of n, a(n) for n = 1..10000</a>
%e A281379 34 is in the sequence because the binary reflected Gray code representation of 34 is '110011', which is palindromic.
%t A281379 Select[Range[0, 10^3], Reverse@ # == # &@ Abs[Prepend[Most@ #, 0] - #] &@
%t A281379 IntegerDigits[#, 2] &] (* _Michael De Vlieger_, Jan 21 2017 *)
%o A281379 (Python)
%o A281379 def G(n):
%o A281379     return bin(n^(n//2))[2:]
%o A281379 i=0
%o A281379 j=1
%o A281379 while j<=10000:
%o A281379     if G(i)==G(i)[::-1]:
%o A281379         print(str(j)+" "+str(i))
%o A281379         j+=1
%o A281379     i+=1
%Y A281379 Cf. A006995, A014550, A281378.
%K A281379 nonn,base
%O A281379 1,3
%A A281379 _Indranil Ghosh_, Jan 21 2017