A289324 Number of twos minus number of ones in the first 10^n entries of the Kolakoski sequence, A000002.
-1, 0, 2, -4, 8, 56, 28, -92, -1350, -2446, 4658, -3174, -101402, -16318, -632474, -1954842, 10724544, 45041304, 111069790, 548593100, 1818298480
Offset: 0
Examples
The first 10 entries in the Kolakoski sequence, A000002, are 1221121221. There are 5 ones and 5 twos, so a(1) = 5 - 5 = 0. The first 100=10^2 entries in the Kolakoski sequence A000002 include 49 ones and 51 twos, so a(2) = 51 - 49 = 2.
Formula
a(n) = 10^n - 2*A195206(n).
Extensions
Additional (20th) term from Richard P. Brent, Mar 01 2018
Comments