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.

A357523 Reverse run lengths in binary expansions of terms of A166535: for n > 0, a(n) is the unique k such that A166535(k) = A056539(A166535(n)); a(0) = 0.

Original entry on oeis.org

0, 1, 2, 3, 6, 5, 4, 7, 14, 9, 10, 13, 12, 11, 8, 15, 20, 23, 24, 19, 16, 27, 26, 17, 18, 25, 22, 21, 40, 41, 46, 35, 32, 49, 50, 31, 36, 45, 42, 39, 28, 29, 38, 43, 44, 37, 30, 51, 48, 33, 34, 47, 88, 63, 62, 89, 94, 57, 68, 83, 80, 71, 54, 53, 72, 79, 84, 67
Offset: 0

Views

Author

Rémy Sigrist, Oct 02 2022

Keywords

Comments

This sequence is a self-inverse permutation of the nonnegative integers.

Examples

			For n = 42:
- A166535(42) = 50,
- the binary expansion of 50 is "110010",
- reversing run lengths yields "101100",
- this corresponds to 44 = A166535(38),
- hence a(42) = 38.
		

Crossrefs

See A357522 for a similar sequence.

Programs

  • PARI
    See Links section.

Formula

a(n) = n iff n = 0 or A166535(n) belongs to A044918.