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.

Showing 1-2 of 2 results.

A161601 Positive integers k that are less than the value of the reversal of k's representation in binary.

Original entry on oeis.org

11, 19, 23, 35, 37, 39, 43, 47, 55, 67, 69, 71, 75, 77, 79, 83, 87, 91, 95, 103, 111, 131, 133, 135, 137, 139, 141, 143, 147, 149, 151, 155, 157, 159, 163, 167, 171, 173, 175, 179, 183, 187, 191, 199, 203, 207, 215, 223, 239, 259, 261, 263, 265, 267, 269, 271
Offset: 1

Views

Author

Leroy Quet, Jun 14 2009

Keywords

Comments

By "reversal" of k's representation in binary, it is meant: write k in binary, reverse the order of its digits, and read the result as a binary value.
This sequence contains only odd integers.

Examples

			37 = 100101_2; its digital reversal is 101001_2 = 41. Since 37 < 41, 37 is in this sequence.
		

Crossrefs

Programs

  • Maple
    a := proc (n) local n2, sz, rv: n2 := convert(n, base, 2): sz := nops(n2): rv := add(n2[j]*2^(sz-j), j = 1 .. sz): if n < rv then n else end if end proc; seq(a(n), n = 1 .. 280); # Emeric Deutsch, Jun 28 2009
  • Mathematica
    Select[Range[300],FromDigits[Reverse[IntegerDigits[#,2]],2]>#&] (* Harvey P. Dale, Mar 19 2016 *)
  • Python
    from itertools import count, islice
    def A161601_gen(startvalue=1): # generator of terms >= startvalue
        return filter(lambda n:nA161601_list = list(islice(A161601_gen(),20)) # Chai Wah Wu, Jan 19 2023

Extensions

Extended by Emeric Deutsch, Jun 28 2009
Edited by Jon E. Schoenfield, Feb 24 2019

A161602 Positive integers k that are greater than the value of the reversal of k's binary representation.

Original entry on oeis.org

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
Offset: 1

Views

Author

Leroy Quet, Jun 14 2009

Keywords

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.

Examples

			29 in binary is 11101. Its digital reversal is 10111, which is 23 in decimal. Since 29 > 23, 29 is in this sequence.
		

Crossrefs

Cf. A030101, A006995, A161601, A161603 (odd terms).
Cf. A071590 (using decimal reversal).

Programs

  • Mathematica
    Select[Range[109], # > IntegerReverse[#, 2] &] (* Michael De Vlieger, Apr 07 2021 *)
  • 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

Extensions

More terms from Max Alekseyev, Sep 11 2009
Showing 1-2 of 2 results.