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!)
A065609 Positive m such that when written in binary, no rotated value of m is greater than m. 38
1, 2, 3, 4, 6, 7, 8, 10, 12, 14, 15, 16, 20, 24, 26, 28, 30, 31, 32, 36, 40, 42, 48, 50, 52, 54, 56, 58, 60, 62, 63, 64, 72, 80, 84, 96, 98, 100, 104, 106, 108, 112, 114, 116, 118, 120, 122, 124, 126, 127, 128, 136, 144, 160, 164, 168, 170, 192, 194, 196, 200, 202 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
COMMENTS
Rotated values of m are defined as the numbers which occur when m is shifted 1, 2, ... bits to the right with the last bits added to the front; e.g., the rotated values of 1011 are 1011, 1101, 1110 and 0111.
The number of k-bit binary numbers in this sequence is A008965. This gives the row lengths when the sequence is regarded as a table.
If m is in the sequence, then so is 2m. All odd terms are of the form 2^k - 1. - Ivan Neretin, Aug 04 2016
First differs from A328595 in lacking 44, with binary expansion {1, 0, 1, 1, 0, 0}, and 92, with binary expansion {1, 0, 1, 1, 1, 0, 0}. - Gus Wiseman, Oct 31 2019
LINKS
EXAMPLE
14 is included because 14 in binary is 1110. 1110 has the rotated values of 0111, 1011 and 1101 -- 7, 11 and 13 -- which are all smaller than 14.
MAPLE
filter:= proc(n) local L, k;
if n::odd then return evalb(n+1 = 2^ilog2(n+1)) fi;
L:= convert(convert(n, binary), string);
for k from 1 to length(L)-1 do
if not lexorder(StringTools:-Rotate(L, k), L) then return false fi;
od;
true
end proc:
select(filter, [$1..1000]); # Robert Israel, Aug 05 2016
MATHEMATICA
Select[Range[200], # == Max[FromDigits[#, 2] & /@ NestList[RotateLeft, dg = IntegerDigits[#, 2], Length@dg]] &] (* Ivan Neretin, Aug 04 2016 *)
PROG
(Python)
def ok(n):
b = bin(n)[2:]
return b > "0" and all(b[i:] + b[:i] <= b for i in range(1, len(b)))
print([k for k in range(203) if ok(k)]) # Michael S. Branicky, May 26 2022
CROSSREFS
A similar concept is A328595.
The version with the most significant digit ignored is A328668 or A328607.
Numbers whose reversed binary expansion is a Lyndon word are A328596.
Numbers whose binary expansion is aperiodic are A328594.
Binary necklaces are A000031.
Necklace compositions are A008965.
Sequence in context: A329399 A329396 A328595 * A334274 A225620 A335041
KEYWORD
base,nonn,tabf
AUTHOR
Jonathan Ayres (jonathan.ayres(AT)btinternet.com), Nov 06 2001
EXTENSIONS
Edited by Franklin T. Adams-Watters, Apr 09 2010
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 16:56 EDT 2024. Contains 371962 sequences. (Running on oeis4.)