

A257250


Numbers n for which A256999(n) = n; numbers that cannot be made any larger by rotating (by one or more steps) the nonmsb bits of their binary representation (with A080541 or A080542).


11



0, 1, 2, 3, 4, 6, 7, 8, 12, 14, 15, 16, 24, 26, 28, 30, 31, 32, 48, 52, 56, 58, 60, 62, 63, 64, 96, 100, 104, 106, 112, 114, 116, 118, 120, 122, 124, 126, 127, 128, 192, 200, 208, 212, 224, 226, 228, 232, 234, 236, 240, 242, 244, 246, 248, 250, 252, 254, 255, 256, 384, 392, 400, 416, 420, 424, 426, 448, 450
(list;
graph;
refs;
listen;
history;
text;
internal format)



OFFSET

0,3


COMMENTS

These correspond to the maximal (lexicographically largest) representatives selected from each equivalence class of binary necklaces. See the last example.
Indexing starts from zero, because a(0) = 0 is a special case.
If k is a member then so also is 2*k, i.e., k with 0 appended to the end of its binary representation.
If k is a member then so also is A004755(k), i.e., k with 1 prepended to the front of its binary representation.
One obtains A065609 if one erases the most significant bit of each term [as A053645(a(n))] and then discards any zeroterms produced from the terms that originally were powers of two (A000079).
First differs from A328607 in lacking 108, with binary expansion 1101100. If we define a dualnecklace to be a finite sequence that is lexicographically maximal (not minimal) among all of its cyclic rotations, these are numbers whose binary expansion, without the most significant digit, is a dualnecklace.  Gus Wiseman, Nov 04 2019


LINKS

Antti Karttunen, Table of n, a(n) for n = 0..16637
Wikipedia, Necklace (combinatorics)
Index entries for sequences related to necklaces


EXAMPLE

For n = 5, with binary representation "101", if we rotate other bits than the most significant bit (that is, only the two rightmost digits "01") one step to either direction, we get "110" = 6 > 5, so 5 can be made larger by such rotations, and thus is NOT included in this sequence.
For n = 6, with binary representation "110", no such rotation will yield a larger number, and thus 6 is included in this sequence.
For n = 28, with binary representation "11100", if we rotate nonmsb bits towards right, we get additional numbers 22, 19 and 25 (with binary representations "10110", "10011", "11001") before coming to 28 again, and 28 is the largest of these numbers, thus 28 is included in this sequence.
Also, if we discard the most significant bit of each and consider them just as binary strings, then A053645(28) = 12 is the lexicographically largest representative of {"1100", "0110", "0011", "1001"}, which is the complete set of representatives for a particular equivalence class of binary necklaces, obtained by rotating all bits of binary string "1100" successively towards right or left.


MATHEMATICA

reckQ[q_]:=Array[OrderedQ[{RotateRight[q, #], q}]&, Length[q]1, 1, And];
Select[Range[0, 110], #<=1reckQ[Rest[IntegerDigits[#, 2]]]&] (* Gus Wiseman, Nov 04 2019 *)


PROG

(Scheme, with Antti Karttunen's IntSeqlibrary)
(define A257250 (MATCHINGPOS 0 0 (lambda (n) (= n (A256999 n)))))


CROSSREFS

Complement: A257739.
Odd terms: A000225.
Subsequence of A065609.
Cf. A004755, A053645, A080541, A080542, A256999.
Subsequence: A258003.
The nondual version is A328668.
The version involving all digits is A065609.
The nondual reversed version is A328607.
Numbers whose reversed binary expansion is a necklace are A328595.
Binary necklaces are A000031.
Necklace compositions are A008965.
Cf. A000120, A001037, A003714, A014081, A069010, A275692, A328594, A328596.
Sequence in context: A166935 A114391 A328607 * A258209 A300630 A077436
Adjacent sequences: A257247 A257248 A257249 * A257251 A257252 A257253


KEYWORD

nonn,base


AUTHOR

Antti Karttunen, May 16 2015


STATUS

approved



