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]

A336953 In binary representation, rotate the digits of n right n places.

Original entry on oeis.org

0, 1, 2, 3, 2, 3, 6, 7, 8, 12, 10, 7, 12, 14, 11, 15, 8, 12, 10, 7, 20, 26, 21, 30, 17, 25, 13, 30, 19, 27, 30, 31, 8, 12, 10, 7, 36, 50, 41, 60, 34, 19, 42, 53, 11, 45, 58, 31, 48, 56, 44, 30, 19, 43, 54, 59, 14, 15, 43, 55, 60, 62, 47, 63, 32, 48, 40, 28
Offset: 0

Views

Author

Gage Schacher, Aug 08 2020

Keywords

Comments

On the graph, there are a series of larger and larger parallelograms joined together by a straight line on y=x where n is unchanged, mostly in the case where n is a multiple of the bit length of n. In addition to the main line that cuts through the graph, each parallelogram has the same few sloped lines in its borders.

Examples

			a(3) = a('11') = '11' = 3;
a(4) = a('100') = '010' = '10' = 2;
a(5) = a('101') = '011' = '11' = 3;
		

Crossrefs

Cf. A007088, A038572 (rotated one binary place to the right).
Cf. A366139 (rotate left), A366140 (fixed points).

Programs

  • Mathematica
    Array[FromDigits[RotateRight[IntegerDigits[#, 2], #], 2] &, 68, 0] (* Michael De Vlieger, Oct 05 2020 *)
  • PARI
    a(n) = my(d=binary(n)); for (k=1, n, d = concat(d[#d], d[1..#d-1])); fromdigits(d, 2); \\ Michel Marcus, Aug 09 2020
    
  • Python
    def A336953(n):
        if n == 0: return 0
        l, m = -(n%n.bit_length()), bin(n)[2:]
        return int(m[l:]+m[:l],2) # Chai Wah Wu, Jan 22 2023
Showing 1-2 of 2 results.