This site is supported by donations to The OEIS Foundation.

 Please make a donation to keep the OEIS running. We are now in our 55th year. In the past year we added 12000 new sequences and reached 8000 citations (which often say "discovered thanks to the OEIS"). We need to raise money to hire someone to manage submissions, which would reduce the load on our editors and speed up editing. Other ways to donate

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A283997 a(n) = n XOR A005187(floor(n/2)), where XOR is bitwise-xor (A003987). 5
 0, 1, 3, 2, 7, 6, 2, 3, 15, 14, 2, 3, 6, 7, 5, 4, 31, 30, 2, 3, 6, 7, 5, 4, 14, 15, 13, 12, 5, 4, 4, 5, 63, 62, 2, 3, 6, 7, 5, 4, 14, 15, 13, 12, 5, 4, 4, 5, 30, 31, 29, 28, 5, 4, 4, 5, 13, 12, 12, 13, 4, 5, 7, 6, 127, 126, 2, 3, 6, 7, 5, 4, 14, 15, 13, 12, 5, 4, 4, 5, 30, 31, 29, 28, 5, 4, 4, 5, 13, 12, 12, 13, 4, 5, 7, 6, 62, 63, 61, 60, 5, 4, 4, 5, 13, 12, 12 (list; graph; refs; listen; history; text; internal format)
 OFFSET 0,3 LINKS Antti Karttunen, Table of n, a(n) for n = 0..8191 FORMULA a(n) = n XOR A005187(floor(n/2)), where XOR is bitwise-xor (A003987). a(n) = A283996(n) - A283998(n). a(n) = A005187(n) - 2*A283998(n). a(n) = A006068(n) XOR A283999(floor(n/2)). MATHEMATICA Table[BitXor[n, 2 # - DigitCount[2 #, 2, 1] &@ Floor[n/2]], {n, 0, 106}] (* Michael De Vlieger, Mar 20 2017 *) PROG (Scheme) (define (A283997 n) (A003987bi n (A005187 (floor->exact (/ n 2))))) ;; Where A003987bi implements bitwise-XOR (A003987). (PARI) b(n) = if(n<1, 0, b(n\2) + n%2); A(n) = 2*n - b(2*n); for(n=0, 110, print1(bitxor(n, A(floor(n/2))), ", ")) \\ Indranil Ghosh, Mar 25 2017 (Python) def A(n): return 2*n - bin(2*n)[2:].count("1") print [n^A(n/2) for n in range(0, 111)] # Indranil Ghosh, Mar 25 2017 CROSSREFS Cf. A003986, A005187, A006068, A283996, A283998, A283999. Cf. also A279357, A283477. Sequence in context: A033318 A093780 A101307 * A096899 A265345 A154448 Adjacent sequences:  A283994 A283995 A283996 * A283998 A283999 A284000 KEYWORD nonn,base,hear,changed AUTHOR Antti Karttunen, Mar 19 2017 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.

Last modified December 14 22:42 EST 2019. Contains 329987 sequences. (Running on oeis4.)