The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
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!)
A341273 If A261283(n) = 0, then a(n) = n, otherwise a(n) is obtained by flipping the A261283(n)-th rightmost bit in the binary expansion of n. 1
0, 0, 0, 7, 0, 7, 7, 7, 0, 25, 42, 75, 76, 45, 30, 7, 0, 25, 82, 51, 52, 85, 30, 7, 25, 25, 30, 25, 30, 25, 30, 30, 0, 97, 42, 51, 52, 45, 102, 7, 42, 45, 42, 42, 45, 45, 42, 45, 52, 51, 51, 51, 52, 52, 52, 51, 120, 25, 42, 51, 52, 45, 30, 127, 0, 97, 82, 75 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,4
COMMENTS
All terms belong to A075926.
LINKS
FORMULA
A261283(a(n)) = 0.
a(a(n)) = a(n).
a(n) = n iff n belongs to A075926.
a(2^k) = 0 for any k >= 0.
EXAMPLE
For n = 7:
- A261283(7) = 0,
- so a(7) = 7.
For n = 43:
- A261283(43) = 1,
- so a(43) is obtained by flipping the rightmost binary digit in 43,
- a(43) = 42.
PROG
(PARI) a(n) = { my (m=n, x=0); while (m, my (v=valuation(m, 2)); x=bitxor(x, v+1); m-=2^v); if (x, bitxor(n, 2^(x-1)), n) }
CROSSREFS
Sequence in context: A335727 A158857 A255727 * A011438 A321022 A216185
KEYWORD
nonn,look,base
AUTHOR
Rémy Sigrist, Feb 08 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 May 14 14:06 EDT 2024. Contains 372533 sequences. (Running on oeis4.)