|
Search: id:A048724
|
|
|
| A048724 |
|
Write n and 2n in binary and add them mod 2. |
|
+0 13
|
|
| 0, 3, 6, 5, 12, 15, 10, 9, 24, 27, 30, 29, 20, 23, 18, 17, 48, 51, 54, 53, 60, 63, 58, 57, 40, 43, 46, 45, 36, 39, 34, 33, 96, 99, 102, 101, 108, 111, 106, 105, 120, 123, 126, 125, 116, 119, 114, 113, 80, 83, 86, 85, 92, 95, 90, 89, 72, 75, 78, 77, 68, 71, 66, 65, 192
(list; graph; listen)
|
|
|
OFFSET
|
0,2
|
|
|
COMMENT
|
Reversing binary representation of -n. Converting sum of powers of 2 in binary representation of a(n) to alternating sum gives -n. Note that the alternation is applied only to the nonzero bits and does not depend on the exponent of two. All integers have a unique reversing binary representation (see cited exercise for proof). Complement of A065621. - Marc LeBrun (mlb(AT)well.com), Nov 07 2001
A permutation of the "evil" numbers A001969 - Marc LeBrun (mlb(AT)well.com), Nov 07 2001
A048725(n) = a(a(n)). - Reinhard Zumkeller (reinhard.zumkeller(AT)gmail.com), Nov 12 2004
|
|
REFERENCES
|
D. E. Knuth, The Art of Computer Programming. Addison-Wesley, Reading, MA, 1969, Vol. 2, p. 178, (exercise 4.1. Nr. 27)
|
|
LINKS
|
T. D. Noe, Table of n, a(n) for n=0..1023
R. Stephan, Some divide-and-conquer sequences ...
R. Stephan, Table of generating functions
|
|
FORMULA
|
a(n) = Xmult(n, 3) (or n XOR (n<<1)). a(n) = A065621(-n).
a(2n) = 2a(n), a(2n+1) = 2a(n) + 2(-1)^n + 1.
G.f. 1/(1-x) * sum(k>=0, 2^k*(3t-t^3)/(1+t)/(1+t^2), t=x^2^k). - Ralf Stephan (ralf(AT)ark.in-berlin.de), Sep 08 2003
a(n)=sum(k=0, n, (1-(-1)^round(+n/2^k))/2*2^k). - Benoit Cloitre, Apr 27 2005
a(n) = A001969(A003188(n)). - Philippe DELEHAM, Apr 29 2005
a(n) = A106409(2*n) for n>0. - Reinhard Zumkeller (reinhard.zumkeller(AT)gmail.com), May 02 2005
a(n) = A142149(2*n). - Reinhard Zumkeller (reinhard.zumkeller(AT)gmail.com), Jul 15 2008
|
|
EXAMPLE
|
12 = 1100 in binary, 24=11000 and their sum is 10100=20, so a(12)=20.
a(4) = 12 = + 8 + 4 -> - 8 + 4 = -4.
|
|
MATHEMATICA
|
Table[ BitXor[2n, n], {n, 0, 65}] (from Robert G. Wilson v (rgwv(at)rgwv.com), Jul 06 2006)
|
|
CROSSREFS
|
Cf. A048720, A048725, A048726, A048728. Bisection of A003188.
See also A065620, A065621.
Sequence in context: A007479 A076535 A095359 this_sequence A115389 A121867 A009193
Adjacent sequences: A048721 A048722 A048723 this_sequence A048725 A048726 A048727
|
|
KEYWORD
|
nonn,nice,easy
|
|
AUTHOR
|
Antti Karttunen, Apr 26, 1999
|
|
|
Search completed in 0.002 seconds
|