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.

A366140 Fixed points of the binary rotations A336953 and A366139: numbers k >= 0 such that A336953(k) = A366139(k) = k.

Original entry on oeis.org

0, 1, 2, 3, 6, 7, 8, 10, 12, 15, 20, 25, 30, 31, 36, 42, 45, 48, 54, 60, 63, 70, 77, 84, 91, 98, 105, 112, 119, 126, 127, 128, 136, 144, 152, 160, 168, 170, 176, 184, 192, 200, 204, 208, 216, 224, 232, 240, 248, 255, 261, 270, 279, 288, 297, 306, 315, 324, 333
Offset: 1

Views

Author

Paolo Xausa, Sep 30 2023

Keywords

Comments

If a number is a fixed point of A336953, then it's also a fixed point of A366139, and vice versa.
k is a term iff A302291(k)|k.

Crossrefs

Programs

  • Mathematica
    A366140Q[n_]:=FromDigits[RotateLeft[IntegerDigits[n,2],n],2]==n;
    Select[Range[0,500],A366140Q]

A366139 In binary representation, rotate the digits of n left n places.

Original entry on oeis.org

0, 1, 2, 3, 1, 6, 6, 7, 8, 3, 10, 13, 12, 11, 11, 15, 1, 6, 20, 25, 20, 11, 26, 29, 12, 25, 21, 15, 7, 30, 30, 31, 2, 12, 40, 49, 36, 11, 26, 60, 10, 52, 42, 23, 50, 45, 43, 55, 48, 35, 11, 30, 13, 58, 54, 47, 35, 15, 46, 61, 60, 59, 59, 63, 1, 6, 20, 56, 17, 98
Offset: 0

Views

Author

Paolo Xausa, Sep 30 2023

Keywords

Examples

			a(4) = 1 because 4 in base 2 is 100 and 100 rotated left 4 times is 100 -> 001 -> 010 -> 100 -> 001 = 1.
a(5) = 6 because 5 in base 2 is 101 and 101 rotated left 5 times is 101 -> 011 -> 110 -> 101 -> 011 -> 110 = 6 in base 10.
		

Crossrefs

Cf. A006257, A007088, A366140 (fixed points).
Cf. A336953 (rotate right).

Programs

  • Mathematica
    A366139[n_]:=FromDigits[RotateLeft[IntegerDigits[n,2],n],2];
    Array[A366139,100,0]
  • Python
    def A366139(n): return int((s:=bin(n))[(m:=n%n.bit_length()+2):]+s[2:m],2) if n else 0 # Chai Wah Wu, Oct 03 2023
Showing 1-2 of 2 results.