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.

A328607 Numbers whose reversed binary expansion, without the most significant digit, is a necklace.

Original entry on oeis.org

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, 108, 112, 116, 118, 120, 122, 124, 126, 127, 128, 192, 200, 208, 212, 216, 220, 224, 228, 232, 234, 236, 240, 244, 246, 248, 250, 252, 254, 255
Offset: 0

Views

Author

Gus Wiseman, Oct 30 2019

Keywords

Comments

Offset is 0 to be consistent with A257250.
A necklace is a finite sequence that is lexicographically minimal among all of its cyclic rotations.

Examples

			The sequence of terms together with their binary expansions and binary indices begins:
    0:        0 ~ {}
    1:        1 ~ {1}
    2:       10 ~ {2}
    3:       11 ~ {1,2}
    4:      100 ~ {3}
    6:      110 ~ {2,3}
    7:      111 ~ {1,2,3}
    8:     1000 ~ {4}
   12:     1100 ~ {3,4}
   14:     1110 ~ {2,3,4}
   15:     1111 ~ {1,2,3,4}
   16:    10000 ~ {5}
   24:    11000 ~ {4,5}
   26:    11010 ~ {2,4,5}
   28:    11100 ~ {3,4,5}
   30:    11110 ~ {2,3,4,5}
   31:    11111 ~ {1,2,3,4,5}
   32:   100000 ~ {6}
   48:   110000 ~ {5,6}
   52:   110100 ~ {3,5,6}
		

Crossrefs

The dual non-reversed version is A257250.
The dual non-reversed version involving all digits is A065609.
The version involving all digits is A328595.
The non-reversed version is A328668.
Binary necklaces are A000031.

Programs

  • Mathematica
    neckQ[q_]:=Array[OrderedQ[{q,RotateRight[q,#]}]&,Length[q]-1,1,And];
    Select[Range[0,100],#<=1||neckQ[Reverse[Rest[IntegerDigits[#,2]]]]&]