|
Search: id:A038712
|
|
|
| A038712 |
|
Let k be highest power of 2 dividing n (A006519); a(n) = 2k-1. |
|
+0 25
|
|
| 1, 3, 1, 7, 1, 3, 1, 15, 1, 3, 1, 7, 1, 3, 1, 31, 1, 3, 1, 7, 1, 3, 1, 15, 1, 3, 1, 7, 1, 3, 1, 63, 1, 3, 1, 7, 1, 3, 1, 15, 1, 3, 1, 7, 1, 3, 1, 31, 1, 3, 1, 7, 1, 3, 1, 15, 1, 3, 1, 7, 1, 3, 1, 127, 1, 3, 1, 7, 1, 3, 1, 15, 1, 3, 1, 7, 1, 3, 1, 31, 1, 3, 1, 7, 1, 3, 1, 15, 1, 3, 1, 7, 1, 3, 1, 63, 1, 3
(list; graph; listen)
|
|
|
OFFSET
|
1,2
|
|
|
COMMENT
|
n XOR n-1, i.e. nim-sum of a pair of consecutive numbers.
Denominator of quotient=sigma[2n]/sigma[n]. - Labos E. (labos(AT)ana.sote.hu), Nov 04 2003
Contribution from Gary W. Adamson (qntmpkt(AT)yahoo.com), Oct 26 2009: (Start)
a(n) = the Tower of Hanoi disc moved at the n-th move, using standard
moves with discs labeled (1, 3, 7, 15,...) starting from top (smallest = 1). (End)
Equals row sums of triangle A168312 [From Gary W. Adamson (qntmpkt(AT)yahoo.com), Nov 22 2009]
|
|
LINKS
|
R. Zumkeller, Table of n, a(n) for n = 1..10000
Klaus Brockhaus, Illustration of A038712 and A080277
R. Stephan, Some divide-and-conquer sequences ...
R. Stephan, Table of generating functions
R. Stephan, Divide-and-conquer generating functions. I. Elementary sequences
Index entries for sequences related to Nim-sums
|
|
FORMULA
|
a(n) = A110654(n-1) XOR A008619(n). - Reinhard Zumkeller, Feb 05 2007
a(n) = 2^A001511(n)-1 = 2*A006519(n)-1 = 2^(A007814(n)+1)-1
Multiplicative with a(2^e)=2^(e+1)-1, a(e^p)=1, p>2. - Vladeta Jovovic (vladeta(AT)eunet.rs), Nov 06 2001
Sum_{n>0} a(n)*x^n/(1+x^n) = Sum_{n>0} x^n/(1-x^n). Inverse Moebius transform of A048298. - Vladeta Jovovic (vladeta(AT)eunet.rs), Jan 02 2003
G.f.: Sum(k>=0, 2^k*x^2^k/(1-x^2^k)). a(2n+1) = 1, a(2n) = 2a(n)+1. - Ralf Stephan (ralf(AT)ark.in-berlin.de), Jun 15 2003
Equals A130093 * [1, 2, 3,...]. - Gary W. Adamson (qntmpkt(AT)yahoo.com), May 13 2007
Sum(i=1,n, (-1)^A000120(n-i)*a(i))=(-1)^(A000120(n)-1)*n. [From Vladimir Shevelev (shevelev(AT)bgu.ac.il), Mar 17 2009]
|
|
EXAMPLE
|
a(6) = 3 because 110 XOR 101 = 11 base 2 = 3
|
|
MATHEMATICA
|
Table[Denominator[DivisorSigma[1, 2*n]/DivisorSigma[1, n]], {n, 1, 128}]
|
|
PROGRAM
|
(C:) int a(int n) { return n ^ (n-1); } - Russ Cox (rsc(AT)swtch.com), May 15 2007
|
|
CROSSREFS
|
A038713 translated from binary, diagonals of A003987 on either side of main diagonal.
Cf. A062383. Partial sums give A080277.
Bisection of A089312. Cf. A088837.
a(n)-1 is exponent of 2 in A089893(n).
Cf. A130093.
This is Guy Steele's sequence GS(6, 2) (see A135416).
Sequence in context: A021991 A112132 A053381 this_sequence A065745 A117677 A038870
Cf. A168312 [From Gary W. Adamson (qntmpkt(AT)yahoo.com), Nov 22 2009]
Adjacent sequences: A038709 A038710 A038711 this_sequence A038713 A038714 A038715
|
|
KEYWORD
|
easy,nonn,mult,new
|
|
AUTHOR
|
Henry Bottomley (se16(AT)btinternet.com), May 02 2000
|
|
|
Search completed in 0.003 seconds
|