login
This site is supported by donations to The OEIS Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A088705 First differences of A000120. One minus exponent of 2 in n. 10
0, 1, 0, 1, -1, 1, 0, 1, -2, 1, 0, 1, -1, 1, 0, 1, -3, 1, 0, 1, -1, 1, 0, 1, -2, 1, 0, 1, -1, 1, 0, 1, -4, 1, 0, 1, -1, 1, 0, 1, -2, 1, 0, 1, -1, 1, 0, 1, -3, 1, 0, 1, -1, 1, 0, 1, -2, 1, 0, 1, -1, 1, 0, 1, -5, 1, 0, 1, -1, 1, 0, 1, -2, 1, 0, 1, -1, 1, 0, 1, -3, 1, 0, 1 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,9

COMMENTS

The number of 1's in the binary expansion of n+1 minus the number of 1's in the binary expansion of n.

For n > 0: a(n) = A000120(n) - A000120(n-1) = 1 - A007814(n).

Multiplicative with a(2^e) = 1-e, a(p^e) = 1 otherwise. [David W. Wilson, Jun 12 2005]

REFERENCES

Yann Bugeaud and Guo-Niu Han,, A combinatorial proof of the non-vanishing of Hankel determinants of the Thue-Morse sequence, Electronic Journal of Combinatorics 21(3) (2014), #P3.26. See F(z) in (1.1). - N. J. A. Sloane, Aug 31 2014

LINKS

Reinhard Zumkeller, Table of n, a(n) for n = 0..10000

R. Stephan, Some divide-and-conquer sequences ...

R. Stephan, Table of generating functions

Index entries for sequences related to binary expansion of n

FORMULA

G.f.: sum(k>=0, t/(1+t), t=x^2^k).

a(0)=0, a(2*n) = a(n) - 1, a(2*n+1) = 1.

Let T(x) be the g.f., then T(x)-T(x^2)=x/(1+x). [Joerg Arndt, May 11 2010]

MAPLE

To get up to a million terms, from N. J. A. Sloane, Aug 31 2014:

add(x^(2^k)/(1+x^(2^k)), k=0..20); series(%, x, 1001); seriestolist(%);

PROG

(PARI) a(n)=if(n<1, 0, if(n%2==0, a(n/2)-1, 1))

(PARI) a(n)=if(n<1, 0, 1-valuation(n, 2))

(Haskell)

a088705 n = a088705_list !! n

a088705_list = 0 : zipWith (-) (tail a000120_list) a000120_list

-- Reinhard Zumkeller, Dec 11 2011

CROSSREFS

Cf. A079559.

Sequence in context: A016353 A016398 A024359 * A065712 A153172 A242498

Adjacent sequences:  A088702 A088703 A088704 * A088706 A088707 A088708

KEYWORD

sign,easy,mult

AUTHOR

Ralf Stephan, Oct 10 2003

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 | More pages
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified October 21 08:27 EDT 2018. Contains 316405 sequences. (Running on oeis4.)