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!)
A161602 Positive integers k that are greater than the value of the reversal of k's binary representation. 5
2, 4, 6, 8, 10, 12, 13, 14, 16, 18, 20, 22, 24, 25, 26, 28, 29, 30, 32, 34, 36, 38, 40, 41, 42, 44, 46, 48, 49, 50, 52, 53, 54, 56, 57, 58, 59, 60, 61, 62, 64, 66, 68, 70, 72, 74, 76, 78, 80, 81, 82, 84, 86, 88, 89, 90, 92, 94, 96, 97, 98, 100, 101, 102, 104, 105, 106, 108, 109 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
COMMENTS
By "reversal" of k's binary representation, it is meant: write k in binary, reverse the order of its digits, and read the result as a binary value.
This sequence contains all the positive even integers.
LINKS
EXAMPLE
29 in binary is 11101. Its digital reversal is 10111, which is 23 in decimal. Since 29 > 23, 29 is in this sequence.
MATHEMATICA
Select[Range[109], # > IntegerReverse[#, 2] &] (* Michael De Vlieger, Apr 07 2021 *)
PROG
(PARI) isok(k) = k > fromdigits(Vecrev(binary(k)), 2); \\ Michel Marcus, Apr 06 2021
(Python)
from itertools import count, islice
def A161602_gen(startvalue=1): # generator of terms >= startvalue
return filter(lambda n:n>int(bin(n)[-1:1:-1], 2), count(max(startvalue, 1)))
A161602_list = list(islice(A161602_gen(), 20)) # Chai Wah Wu, Jan 19 2023
CROSSREFS
Cf. A030101, A006995, A161601, A161603 (odd terms).
Cf. A071590 (using decimal reversal).
Sequence in context: A365453 A365984 A301454 * A359496 A356066 A285591
KEYWORD
base,nonn
AUTHOR
Leroy Quet, Jun 14 2009
EXTENSIONS
More terms from Max Alekseyev, Sep 11 2009
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 18 18:58 EDT 2024. Contains 371781 sequences. (Running on oeis4.)