login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A334667 For any number with binary expansion (b_1, ..., b_w), replace the i-th "1" by b_{w+1-i} for i = 1..A000120(n) and the j-th "0" by b_j for j = 1..A023416(n); the resulting binary expansion is that of a(n). 2
0, 1, 1, 3, 2, 6, 3, 7, 4, 12, 6, 14, 3, 11, 7, 15, 8, 24, 10, 26, 9, 25, 14, 30, 6, 22, 13, 29, 7, 23, 15, 31, 16, 48, 18, 50, 17, 49, 22, 54, 18, 50, 25, 57, 21, 53, 30, 62, 12, 44, 28, 60, 14, 46, 29, 61, 7, 39, 23, 55, 15, 47, 31, 63, 32, 96, 34, 98, 33 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,4
COMMENTS
Fixed points correspond to A000225.
LINKS
FORMULA
A000120(a(n)) = A000120(n).
EXAMPLE
For n = 41:
- the binary representation of 41 is "101001",
- the 3 1's are replaced by 1, 0, 0, respectively,
- the 3 0's are replaced by 1, 0, 1, respectively,
- hence we obtain "110010",
- and a(41) = 50.
PROG
(PARI) a(n) = { my (b=binary(n), t=vector(#b), l=0, r=#b+1); for (k=1, #b, t[k] = if (!b[k], b[l++], b[r--])); fromdigits(t, 2) }
CROSSREFS
See A334666 for a similar sequence.
Sequence in context: A144559 A155114 A038572 * A245676 A341516 A060992
KEYWORD
nonn,base
AUTHOR
Rémy Sigrist, May 08 2020
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 24 05:19 EDT 2024. Contains 371918 sequences. (Running on oeis4.)