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

 

Logo

Annual Appeal: Please make a donation to keep the OEIS running. In 2017 we replaced the server with a faster one, added 20000 new sequences, and reached 7000 citations (often saying "discovered thanks to the OEIS").
Other ways to donate

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A068639 a(0) = 0, a(n) = a(n-1) + (-1)^p(n) for n >= 1, where p(n) = highest power of 2 dividing n. 2
0, 1, 0, 1, 2, 3, 2, 3, 2, 3, 2, 3, 4, 5, 4, 5, 6, 7, 6, 7, 8, 9, 8, 9, 8, 9, 8, 9, 10, 11, 10, 11, 10, 11, 10, 11, 12, 13, 12, 13, 12, 13, 12, 13, 14, 15, 14, 15, 16, 17, 16, 17, 18, 19, 18, 19, 18, 19, 18, 19, 20, 21, 20, 21, 22, 23, 22, 23, 24, 25, 24, 25, 24, 25, 24, 25, 26, 27, 26 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,5

REFERENCES

J.-P. Allouche and J. Shallit, The ring of k-regular sequences, II, Theoret. Computer Sci., 307 (2003), 3-29.

LINKS

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

J.-P. Allouche, J. Shallit, The Ring of k-regular Sequences, II

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

R. Stephan, Table of generating functions

FORMULA

a(n)=(n+2*A065359(n))/3; a(n) is asymptotic to n/3. - Benoit Cloitre, Oct 04 2003

a(0)=0, a(2n) = -a(n) + n, a(2n+1) = -a(n) + n + 1. a(n) = (1/2) * (A050292(n) + A065639(n)). G.f. 1/2 * 1/(1-x) * sum(k>=0, (-1)^k*t/(1-t^2), t=x^2^k). - Ralf Stephan, Oct 17 2003

a(0)=0 then a(n)=ceiling(n/2)-a(n-ceiling(n/2)) - Benoit Cloitre, May 03 2004

PROG

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

CROSSREFS

Cf. A087733.

Sequence in context: A171465 A178620 A023524 * A074070 A304097 A251101

Adjacent sequences:  A068636 A068637 A068638 * A068640 A068641 A068642

KEYWORD

nonn,easy

AUTHOR

N. J. A. Sloane, Oct 01 2003

EXTENSIONS

More terms from John W. Layman and Robert G. Wilson v, Oct 02 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
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified December 9 16:41 EST 2018. Contains 318023 sequences. (Running on oeis4.)