login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A281378 Palindromic numbers which are also palindromic in their binary reflected Gray code representation. 2
0, 1, 2, 5, 6, 66, 77, 626, 5005, 7777, 22122, 64446, 87978, 399993, 1287821, 5614165, 5679765, 6407046, 6865686, 7107017, 8349438, 8547458, 282777282, 1220330221, 43474247434, 43833533834, 64630703646, 68622322686, 73855855837, 1249451549421, 2468208028642 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,3
LINKS
EXAMPLE
626 is in the sequence because binary reflected Gray code for 626 is '1101001011' and both 626 and '1101001011' are palindromics.
MATHEMATICA
Select[Range[10^7], And[Reverse@ # == # &@ IntegerDigits@ #, 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=1
j=1
while j<=23:
....if i==int(str(i)[::-1]) and G(i)==G(i)[::-1]:
........print str(j)+" "+str(i)
........j+=1
....i+=1
(PARI) lista(nn) = {my(v, w); for(k=0, nn, if((w=digits(k))==Vecrev(w) && (v=binary(bitxor(k, k>>1)))==Vecrev(v), print1(k, ", "))); } \\ Jinyuan Wang, Mar 01 2020
CROSSREFS
Sequence in context: A365503 A055877 A288799 * A219117 A111190 A244434
KEYWORD
nonn,base
AUTHOR
Indranil Ghosh, Jan 20 2017
EXTENSIONS
0 and more terms added by Chai Wah Wu, Jan 23 2017
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 24 22:17 EDT 2024. Contains 371964 sequences. (Running on oeis4.)