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!)
A176630 Nonpalindromic numbers whose binary representation when reversed is the same as binary representation of the number reversed in decimal. 0

%I #11 Dec 30 2020 03:00:22

%S 92,732,759,957,5485,5845,71869,77360,96817,319773,377913,13162800,

%T 39781062,79497594,94729789,98792749,144579540,1231493321,1233941321,

%U 7075293947,7493925707,32817543720,71461803829,92830816417

%N Nonpalindromic numbers whose binary representation when reversed is the same as binary representation of the number reversed in decimal.

%C The binary representation of a decimal number, when reversed, is also the reverse of the decimal number.

%F Intersection of A029742 and A081434. - _Andrew Howroyd_, Jan 14 2020

%e 92 = 1011100 mirrors 0011101 = 29.

%e 732 = 1011011100 mirrors 0011101101 = 237.

%t Select[Range[10^6], And[! PalindromeQ@ #, Drop[#, LengthWhile[#, # == 0 &]] &@ Reverse@ IntegerDigits[#, 2] === IntegerDigits[IntegerReverse[#], 2]] &] (* _Michael De Vlieger_, Dec 29 2020 *)

%o (PARI) is(n)={my(t=fromdigits(Vecrev(digits(n,10)),10)); t<>n && t == fromdigits(Vecrev(digits(n,2)),2)}

%o { for(k=1, 10^6, if(is(k), print1(k, ", "))) } \\ _Andrew Howroyd_, Jan 14 2020

%o (Python)

%o def agen():

%o k = 0

%o while True:

%o strk = str(k)

%o revstrk = strk[::-1]

%o if revstrk != strk:

%o if int(revstrk) == int((bin(k)[2:])[::-1], 2):

%o yield k

%o k += 1

%o g = agen()

%o print([next(g) for i in range(11)]) # _Michael S. Branicky_, Dec 29 2020

%Y Cf. A029742, A081434.

%K base,more,nonn

%O 1,1

%A _Gil Broussard_, Apr 22 2010

%E Name clarified and a(12)-a(17) from _Andrew Howroyd_, Jan 14 2020

%E a(18)-a(24) from _Michael S. Branicky_, Dec 29 2020

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 25 01:35 EDT 2024. Contains 371964 sequences. (Running on oeis4.)