The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A115384 Partial sums of Thue-Morse numbers A010060. 22

%I #58 Mar 27 2023 07:51:28

%S 0,1,2,2,3,3,3,4,5,5,5,6,6,7,8,8,9,9,9,10,10,11,12,12,12,13,14,14,15,

%T 15,15,16,17,17,17,18,18,19,20,20,20,21,22,22,23,23,23,24,24,25,26,26,

%U 27,27,27,28,29,29,29,30,30,31,32,32,33,33,33,34,34,35,36,36,36,37,38,38

%N Partial sums of Thue-Morse numbers A010060.

%H G. C. Greubel, <a href="/A115384/b115384.txt">Table of n, a(n) for n = 0..10000</a>

%H Hassan Tarfaoui, <a href="http://d.tarfaoui.free.fr/cg/1990/EX1/exobis.pdf">Concours Général 1990 - Exercice 1</a> (in French).

%H <a href="/index/O#Olympiads">Index to sequences related to Olympiads and other Mathematical competitions</a>.

%F a(n) = Sum_{k=0..n} A010060(k)^2.

%F a(n+1) = A115382(2n, n).

%F a(n)/n -> 1/2; a(n) = number of odious numbers <= n, see A000069. - _Reinhard Zumkeller_, Aug 26 2007, corrected by _M. F. Hasler_, May 22 2017.

%F a(n) = Sum_{i=1..n} (S2(n) mod 2), where S2 = binary weight; lim a(n)/n = 1/2. More generally, consider a(n) = Sum_{i=1..n} (F(Sk(n)) mod m), where Sk(n) is sum of digits of n, n in base k; F(t) is an arithmetic function; m integer. How does lim a(n)/n depend on F(t)? - _Ctibor O. Zizka_, Feb 25 2008

%F a(n) = n + 1 - A159481(n). - _Reinhard Zumkeller_, Apr 16 2009

%F a(n) = floor((n+1)/2)+(1+(-1)^n)*(1-(-1)^A000120(n))/4. - _Vladimir Shevelev_, May 27 2009

%F G.f.: (1/(1 - x)^2 - Product_{k>=1} (1 - x^(2^k)))/2. - _Ilya Gutkovskiy_, Apr 03 2019

%F a(n) = A026430(n+1) - n - 1. - _Michel Dekking_, Sep 17 2019

%F a(2n+1) = n+1 (see Hassan Tarfaoui link, Concours Général 1990). - _Bernard Schott_, Jan 21 2022

%t Accumulate[Nest[Flatten[#/.{0->{0,1},1->{1,0}}]&,{0},7]] (* _Peter J. C. Moses_, Apr 15 2013 *)

%t Accumulate[ThueMorse[Range[0,100]]] (* Requires Mathematica version 10 or later *) (* _Harvey P. Dale_, Jun 02 2017 *)

%o (PARI) a(n)=n\2 + (n%2 || hammingweight(n+1)%2==0) \\ _Charles R Greathouse IV_, Mar 22 2013

%o (Python)

%o def A115384(n): return (n>>1)+(n&1|((n+1).bit_count()&1^1)) # _Chai Wah Wu_, Mar 01 2023

%Y Cf. A000069, A000120, A010060, A026430, A115382, A159481.

%K easy,nonn

%O 0,3

%A _Paul Barry_, Jan 21 2006

%E Edited by _M. F. Hasler_, May 22 2017

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified June 8 17:05 EDT 2024. Contains 373224 sequences. (Running on oeis4.)