A135993 a(0) = 0; a(n) = (floor(n/S2(n))) mod 2 for n >= 1, where S2(n) is the binary weight of n.
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, 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, 0, 1, 1
Offset: 0
Examples
a(17) = floor(17/2) mod 2 = 0. a(18) = floor(18/2) mod 2 = 1.
Links
- J.-P. Allouche, J. Shallit and J. Sondow, Summation of Series Defined by Counting Blocks of Digits, arXiv:math/0512399 [math.NT], 2005-2006.
- J.-P. Allouche, J. Shallit and J. Sondow, Summation of series defined by counting blocks of digits, J. Number Theory 123 (2007), 133-143.
- Jonathan Sondow and Petros Hadjicostas, The Generalized-Euler-Constant Function (z) and a Generalization of Somos's Quadratic Recurrence Constant, arXiv:math/0610499 [math.CA], 2006.
- Jonathan Sondow and Petros Hadjicostas, The generalized-Euler-constant function gamma(z) and a generalization of Somos's quadratic recurrence constant, J. Math. Anal. Appl. 332 (2007), 292-314.
Programs
-
PARI
a(n) = if (n==0, 0, n\hammingweight(n) % 2); \\ Michel Marcus, Feb 04 2016
Formula
a(n) = A135941(n) mod 2 for n > 0. - Michel Marcus, Feb 04 2016
Extensions
Converted references into links - R. J. Mathar, Oct 30 2009