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!)
A334666 For any number with binary expansion (b_1, ..., b_w), replace the i-th "1" by b_i for i = 1..A000120(n) and the j-th "0" by b_{w+1-j} for j = 1..A023416(n); the resulting binary expansion is that of a(n). 3
0, 1, 2, 3, 4, 6, 6, 7, 8, 12, 9, 13, 12, 14, 14, 15, 16, 24, 20, 28, 17, 25, 19, 27, 24, 28, 25, 29, 28, 30, 30, 31, 32, 48, 40, 56, 34, 50, 41, 57, 33, 49, 38, 54, 37, 53, 39, 55, 48, 56, 52, 60, 49, 57, 51, 59, 56, 60, 57, 61, 60, 62, 62, 63, 64, 96, 80 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,3
COMMENTS
Fixed points correspond to A023758.
LINKS
FORMULA
A000120(a(n)) = A000120(n).
A023416(a(n)) = A023416(n).
EXAMPLE
For n = 41:
- the binary representation of 41 is "101001",
- the 3 1's are replaced by 1, 0, 1, respectively,
- the 3 0's are replaced by 1, 0, 0, respectively,
- hence we obtain "110001",
- and a(41) = 49.
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 A334667 for a similar sequence.
Sequence in context: A050460 A246594 A175808 * A163380 A233569 A246593
KEYWORD
nonn,base
AUTHOR
Rémy Sigrist, May 07 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 May 6 18:59 EDT 2024. Contains 372297 sequences. (Running on oeis4.)