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.

A344531 a(n) = Sum_{k >= 0} b_k * 2^A061579(k) for any number n with binary expansion Sum_{k >= 0} b_k * 2^k.

Original entry on oeis.org

0, 1, 4, 5, 2, 3, 6, 7, 32, 33, 36, 37, 34, 35, 38, 39, 16, 17, 20, 21, 18, 19, 22, 23, 48, 49, 52, 53, 50, 51, 54, 55, 8, 9, 12, 13, 10, 11, 14, 15, 40, 41, 44, 45, 42, 43, 46, 47, 24, 25, 28, 29, 26, 27, 30, 31, 56, 57, 60, 61, 58, 59, 62, 63, 512, 513, 516
Offset: 0

Views

Author

Rémy Sigrist, May 22 2021

Keywords

Comments

This sequence is a self-inverse permutation of the nonnegative integers.
Fixed points correspond to A261195.

Examples

			For n = 42:
- 42 = 2^1 + 2^3 + 2^5,
- A061579(1) = 2,
- A061579(3) = 5,
- A061579(5) = 3,
- so a(42) = 2^2 + 2^5 + 2^3 = 44.
		

Crossrefs

Cf. A000120, A000217, A061579, A261195 (fixed points).

Programs

  • PARI
    a(n) = { my (v=0, e, t=0, w=1); while (n, n-=2^e=valuation(n, 2); while (e>t+w-1, t+=w; w++); v+=2^(2*t+w-1-e)); v }

Formula

a(n) = n iff n belongs to A261195.
A000120(a(n)) = A000120(n).
a(n) < 2^A000217(k) for any n < 2^A000217(k).