login
a(0) = 0; a(n) = (floor(n/S2(n))) mod 2 for n >= 1, where S2(n) is the binary weight of n.
1

%I #19 May 14 2020 22:49:29

%S 0,1,0,1,0,0,1,0,0,0,1,1,0,0,0,1,0,0,1,0,0,1,1,1,0,0,0,0,1,1,1,0,0,0,

%T 1,1,0,0,0,1,0,1,0,0,0,1,1,1,0,0,0,0,1,1,1,1,0,0,0,1,1,0,0,0,0,0,1,0,

%U 0,1,1

%N a(0) = 0; a(n) = (floor(n/S2(n))) mod 2 for n >= 1, where S2(n) is the binary weight of n.

%H J.-P. Allouche, J. Shallit and J. Sondow, <a href="http://arxiv.org/abs/math/0512399">Summation of Series Defined by Counting Blocks of Digits</a>, arXiv:math/0512399 [math.NT], 2005-2006.

%H J.-P. Allouche, J. Shallit and J. Sondow, <a href="http://dx.doi.org/10.1016/j.jnt.2006.06.001">Summation of series defined by counting blocks of digits</a>, J. Number Theory 123 (2007), 133-143.

%H Jonathan Sondow and Petros Hadjicostas, <a href="http://arxiv.org/abs/math/0610499">The Generalized-Euler-Constant Function (z) and a Generalization of Somos's Quadratic Recurrence Constant</a>, arXiv:math/0610499 [math.CA], 2006.

%H Jonathan Sondow and Petros Hadjicostas, <a href="http://dx.doi.org/10.1016/j.jmaa.2006.09.081">The generalized-Euler-constant function gamma(z) and a generalization of Somos's quadratic recurrence constant</a>, J. Math. Anal. Appl. 332 (2007), 292-314.

%F a(n) = A135941(n) mod 2 for n > 0. - _Michel Marcus_, Feb 04 2016

%e a(17) = floor(17/2) mod 2 = 0.

%e a(18) = floor(18/2) mod 2 = 1.

%o (PARI) a(n) = if (n==0, 0, n\hammingweight(n) % 2); \\ _Michel Marcus_, Feb 04 2016

%Y Cf. A007953, A010060, A135941.

%K easy,nonn

%O 0,1

%A _Ctibor O. Zizka_, Mar 03 2008

%E Converted references into links - _R. J. Mathar_, Oct 30 2009