cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

Showing 1-3 of 3 results.

A088568 3*n - 2*(partial sums of Kolakoski sequence A000002).

Original entry on oeis.org

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

Views

Author

Benoit Cloitre, Nov 17 2003; definition changed Oct 16 2005

Keywords

Comments

It is conjectured that a(n) = o(n).
It is conjectured that the density of 1's and that of 2's in the Kolakoski sequence A000002 are equal to 1/2. The deficit of 2's in the Kolakoski sequence at rank n being defined as n/2 - number of 2's in the Kolakoski word of length n, a(n) is equal to twice the deficit of 2's (or twice the excess of 1's). Equivalently, the number of 2's up to rank n in the Kolakoski sequence is (n - a(n))/2. - Jean-Christophe Hervé, Oct 05 2014
The conjecture about the densities of 1's and 2's is equivalent to a(n) = o(n). The graph shows that a(n) seems to oscillate around 0 with a pseudo-periodic and fractal pattern. - Jean-Christophe Hervé, Oct 05 2014
It is conjectured that a(n) = O(log(n)) (see PlanetMath link). Note that for a random sequence of 1's and -1's, we would have O(sqrt(n)). - Daniel Forgues, Jul 10 2015
The linked PlanetMath text mentions 0.5*n + O(log(n)) only in respect of an empirical observation, apparently to support the density conjecture (the conjecture described above in the first comment dated Oct 05 2014). - Peter Munn, Aug 03 2022
The conjecture that a(n) = O(log(n)) seems incorrect as |a(n)| seems to grow as fast as sqrt(n), see A289323 and note that a(2^n) = -A289323(n), so for example a(2^64) = -A289323(64) = -836086974 which is much larger in absolute value than log(2^64), but about 0.19*2^32. - Richard P. Brent, Jul 07 2017
For n = 124 to 147, we have the same 24 values as for n = 42 to 65: {0, 1, 0, -1, 0, -1, 0, 1, 0, 1, 2, 1, 0, 1, 0, -1, 0, 1, 0, 1, 0, -1, 0, -1}, and for n = 173 to 200, we have the same 28 values as for n = 11 to 38: {-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}. - Daniel Forgues, Jul 11 2015

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
		

Crossrefs

Cf. A000002 (Kolakoski sequence), A054353 (partial sums of Kolakoski sequence), A156077 (number of 1's in the Kolakoski sequence).
For the discrepancy of the Kolakoski sequence see A294448 (this is simply the negation of the present sequence).
For records see A294449.

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

A289322 Number of 1s in the first 2^n entries of the Kolakoski sequence, A000002.

Original entry on oeis.org

1, 1, 2, 4, 8, 17, 32, 64, 129, 256, 513, 1024, 2051, 4093, 8192, 16381, 32746, 65523, 131082, 262168, 524262, 1048547, 2097100, 4194345, 8388733, 16777351, 33554669, 67109796, 134219275, 268437750, 536872179
Offset: 0

Views

Author

Richard P. Brent, Jul 05 2017

Keywords

Examples

			The first 32 entries of the Kolakoski sequence, A000002, are 12211212212211211221211212211211. From this we see that a(5)=17, since among the first 2^5 letters, 17 of them are 1s.
		

Crossrefs

Cf. A000002. Analogous for powers of ten is A195206. Equivalent but with smaller entries is A289323. Closely related are A054353, A074286, A088568, A156077.

Formula

a(n) = (2^n + A088568(2^n))/2 = (2^n - A289323(n))/2.

A289324 Number of twos minus number of ones in the first 10^n entries of the Kolakoski sequence, A000002.

Original entry on oeis.org

-1, 0, 2, -4, 8, 56, 28, -92, -1350, -2446, 4658, -3174, -101402, -16318, -632474, -1954842, 10724544, 45041304, 111069790, 548593100, 1818298480
Offset: 0

Views

Author

Richard P. Brent, Jul 07 2017

Keywords

Comments

This is equivalent to A195206, since a(n) = (#twos)-(#ones) = 10^n-2*(#ones) in the first 10^n entries of A000002.
For example, a(2) = 51 - 49 = (100 - 49) - 49 = 100 - 2*49 = 2 because there are 49 ones and 51 twos in the first 100 = 10^2 entries of A000002.
The entries in this sequence appear to be of order 10^(n/2), whereas the entries in A195206 are larger (of order 10^n).
This sequence is analogous to A289323; the difference is that the indices are powers of ten instead of powers of two.

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.
		

References

Crossrefs

Formula

a(n) = 10^n - 2*A195206(n).

Extensions

Additional (20th) term from Richard P. Brent, Mar 01 2018
Showing 1-3 of 3 results.