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.

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

This page as a plain text file.
%I A161601 #17 Jan 20 2023 01:35:10
%S A161601 11,19,23,35,37,39,43,47,55,67,69,71,75,77,79,83,87,91,95,103,111,131,
%T A161601 133,135,137,139,141,143,147,149,151,155,157,159,163,167,171,173,175,
%U A161601 179,183,187,191,199,203,207,215,223,239,259,261,263,265,267,269,271
%N A161601 Positive integers k that are less than the value of the reversal of k's representation in binary.
%C A161601 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.
%C A161601 This sequence contains only odd integers.
%H A161601 Harvey P. Dale, <a href="/A161601/b161601.txt">Table of n, a(n) for n = 1..1000</a>
%e A161601 37 = 100101_2; its digital reversal is 101001_2 = 41. Since 37 < 41, 37 is in this sequence.
%p A161601 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
%t A161601 Select[Range[300],FromDigits[Reverse[IntegerDigits[#,2]],2]>#&] (* _Harvey P. Dale_, Mar 19 2016 *)
%o A161601 (Python)
%o A161601 from itertools import count, islice
%o A161601 def A161601_gen(startvalue=1): # generator of terms >= startvalue
%o A161601     return filter(lambda n:n<int(bin(n)[-1:1:-1],2),count(max(startvalue|1,1),2))
%o A161601 A161601_list = list(islice(A161601_gen(),20)) # _Chai Wah Wu_, Jan 19 2023
%Y A161601 Cf. A030101, A006995, A161602, A161603.
%K A161601 base,nonn
%O A161601 1,1
%A A161601 _Leroy Quet_, Jun 14 2009
%E A161601 Extended by _Emeric Deutsch_, Jun 28 2009
%E A161601 Edited by _Jon E. Schoenfield_, Feb 24 2019