login
A281379
Numbers which are palindromic in their binary reflected Gray code representation.
4
0, 1, 2, 5, 6, 10, 14, 18, 21, 25, 30, 34, 42, 54, 62, 66, 77, 85, 90, 102, 105, 113, 126, 130, 146, 170, 186, 198, 214, 238, 254, 258, 285, 301, 306, 330, 341, 357, 378, 390, 409, 425, 438, 462, 465, 481, 510, 514, 546, 594, 626, 650, 682, 730, 762, 774, 806, 854, 886, 910, 942
OFFSET
1,3
COMMENTS
A281378 is a subsequence of this sequence.
LINKS
EXAMPLE
34 is in the sequence because the binary reflected Gray code representation of 34 is '110011', which is palindromic.
MATHEMATICA
Select[Range[0, 10^3], Reverse@ # == # &@ Abs[Prepend[Most@ #, 0] - #] &@
IntegerDigits[#, 2] &] (* Michael De Vlieger, Jan 21 2017 *)
PROG
(Python)
def G(n):
....return bin(n^(n/2))[2:]
i=0
j=1
while j<=10000:
....if G(i)==G(i)[::-1]:
........print str(j)+" "+str(i)
........j+=1
....i+=1
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Indranil Ghosh, Jan 21 2017
STATUS
approved