login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A326729 a(0) = 0; for n >= 1, a(n) = result of inverting s-th bit (from right) in n, where s is the number of ones in the binary representation of n. 4
0, 0, 3, 1, 5, 7, 4, 3, 9, 11, 8, 15, 14, 9, 10, 7, 17, 19, 16, 23, 22, 17, 18, 31, 26, 29, 30, 19, 24, 21, 22, 15, 33, 35, 32, 39, 38, 33, 34, 47, 42, 45, 46, 35, 40, 37, 38, 63, 50, 53, 54, 59, 48, 61, 62, 39, 60, 49, 50, 43, 52, 45, 46, 31, 65, 67, 64, 71, 70, 65, 66, 79, 74, 77, 78, 67, 72, 69, 70, 95, 82, 85, 86, 91, 80, 93, 94, 71, 92, 81, 82, 75, 84, 77, 78, 127, 98, 101, 102, 107, 96 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,3

COMMENTS

Iterations of a(n) always reach 0 (cf. A326730), see Problem 5 of IMO 2019.

LINKS

Table of n, a(n) for n=0..100.

International Mathematical Olympiad, Problem 5 of IMO 2019.

FORMULA

For n>=1, a(n) = n XOR 2^(A000120(n)-1).

PROG

(PARI) A326729(n) = if(n==0, return(0)); bitxor(n, 2^(hammingweight(n)-1));

CROSSREFS

Cf. A000120, A326730, A326731, A326732.

Sequence in context: A077020 A107920 A169998 * A171998 A159285 A021080

Adjacent sequences:  A326726 A326727 A326728 * A326730 A326731 A326732

KEYWORD

base,nonn

AUTHOR

Max Alekseyev, Jul 22 2019

STATUS

approved

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified July 7 23:03 EDT 2020. Contains 335502 sequences. (Running on oeis4.)