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!)
A340402 For any number n >= 0 with binary expansion Sum_{k = 0..w} b(k)*2^k, a(n) = (b(0)*A340400(0)) XOR ... XOR (b(w)*A340400(w)) (where XOR denotes the bitwise XOR operator). 3
0, 1, 3, 2, 5, 4, 6, 7, 13, 12, 14, 15, 8, 9, 11, 10, 21, 20, 22, 23, 16, 17, 19, 18, 24, 25, 27, 26, 29, 28, 30, 31, 55, 54, 52, 53, 50, 51, 49, 48, 58, 59, 57, 56, 63, 62, 60, 61, 34, 35, 33, 32, 39, 38, 36, 37, 47, 46, 44, 45, 42, 43, 41, 40, 89, 88, 90, 91 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,3
COMMENTS
This sequence is a permutation of the nonnegative integers (with inverse A340478) that preserves the number of binary digits.
LINKS
EXAMPLE
For n = 41:
- 41 = 2^5 + 2^3 + 2^0,
- so a(41) = A340400(5) XOR A340400(3) XOR A340400(0) = 55 XOR 13 XOR 1 = 59.
PROG
(PARI) See Links section.
CROSSREFS
Cf. A340400, A340401, A340478 (inverse).
Sequence in context: A371977 A371976 A340478 * A193231 A191672 A273876
KEYWORD
nonn,base
AUTHOR
Rémy Sigrist, Jan 06 2021
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 25 01:35 EDT 2024. Contains 371964 sequences. (Running on oeis4.)