A088568 3*n - 2*(partial sums of Kolakoski sequence A000002).
1, 0, -1, 0, 1, 0, 1, 0, -1, 0, -1, -2, -1, 0, -1, 0, 1, 0, -1, 0, -1, 0, 1, 0, 1, 0, -1, 0, 1, 0, 1, 2, 1, 2, 1, 0, 1, 0, -1, 0, 1, 0, 1, 0, -1, 0, -1, 0, 1, 0, 1, 2, 1, 0, 1, 0, -1, 0, 1, 0, 1, 0, -1, 0, -1, -2, -1, 0, -1, 0, 1, 0, 1, 0, -1, 0, -1, 0, 1, 0, -1, 0, -1, -2, -1, 0, -1, 0, -1, -2, -1, -2, -3, -2, -1, -2, -1, 0, -1, -2, -1, -2, -1, 0, -1, 0, -1
Offset: 1
Examples
The sequence A000002 starts 1, 2, 2, 1, 1, 2, ..., so the sixth partial sum is 1 + 2 + 2 + 1 + 1 + 2 = 9, and therefore a(6) = 3*6 - 2*9 = 0. - _Michael B. Porter_, Jul 08 2016
Links
- Jean-Christophe Hervé, Table of n, a(n) for n = 1..10000
- Richard P. Brent, Fast algorithms for the Kolakoski sequence, Slides from a talk, 2016.
- A. Scolnicov, Kolakoski sequence, PlanetMath.org.
Crossrefs
Formula
a(n) = 3*n - 2*A054353(n) by definition. - Jean-Christophe Hervé, Oct 05 2014
a(n) = 2*A156077(n) - n. - Jean-Christophe Hervé, Oct 05 2014
Comments