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-2 of 2 results.

A229785 Partial sums of A157129.

Original entry on oeis.org

1, 2, 4, 6, 7, 8, 9, 10, 12, 14, 16, 18, 19, 20, 22, 24, 25, 26, 28, 30, 31, 32, 33, 34, 36, 38, 40, 42, 43, 44, 45, 46, 48, 50, 52, 54, 55, 56, 58, 60, 61, 62, 63, 64, 66, 68, 70, 72, 73, 74, 76, 78, 79, 80, 81, 82, 84, 86, 88, 90, 91, 92, 94, 96, 97, 98, 100, 102, 103, 104
Offset: 1

Views

Author

Benoit Cloitre, Sep 29 2013

Keywords

Comments

Although the behavior of the partial sums of the Kolakoski sequence (A054353) is mysterious, this sequence is much easier to handle.

Crossrefs

Formula

a(n)=(3/2)n+O(1). More precisely, let b(n)=3*n-2*a(n); then b(n) satisfies the following recurrence modulo 12: b(n)=1,2,1,0,1,2,3,4,3,2,1 for n=1,2,3,4,5,6,7,8,9,10,11. Then for k>=1 we have b(12k)=b(4k), b(12k+1)=b(4k+1), b(12k+2)=b(4k+2), b(12k+2)=b(4k+2), b(12k+3)=b(4k+2)-1, b(12k+4)=b(4k+2)-2, b(12k+5)=b(4k+2)-1, b(12k+6)=b(4k+2), b(12k+7)=4-b(4k+3), b(12k+8)=4-b(4k+4), b(12k+9)=4-b(4k+3), b(12k+10)=4-b(4k+2), b(12k+11)=b(4k+3).

A157196 a(n) = (1/2)*(sum of elements of n-th run) using 1 and 2 starting with 1,1.

Original entry on oeis.org

1, 1, 2, 1, 1, 1, 1, 2, 1, 1, 2, 1, 1, 2, 2, 1, 1, 2, 1, 1, 1, 1, 2, 1, 1, 2, 2, 1, 1, 1, 1, 2, 1, 1, 2, 2, 1, 1, 2, 1, 1, 2, 1, 1, 1, 1, 2, 1, 1, 2, 2, 1, 1, 1, 1, 2, 1, 1, 2, 1, 1, 2, 2, 1, 1, 2, 1, 1, 1, 1, 2, 2, 1, 1, 2, 1, 1, 1, 1, 2, 1, 1, 2, 2, 1, 1, 2, 1, 1, 2, 1, 1, 1, 1, 2, 1, 1, 2, 2, 1, 1, 1, 1, 2, 1
Offset: 1

Views

Author

Benoit Cloitre, Feb 24 2009

Keywords

Comments

We conjecture that the density of 1's in the sequence approaches 2/3 as n -> infinity. This conjecture is proved in the paper of Shallit.

Examples

			Write the sums of elements in each run, you obtain: 2,2,4,2,2,2,2,4,2,2,4,2,2,4,4,... dividing by 2 you get: 1,1,2,1,1,1,1,2,1,1,2,1,1,2,2,... the sequence itself.
		

Crossrefs

Programs

  • Maple
    mx:= 1000: l:= [1$2]: a:= n-> l[n]:
    for h from 2 while nops(l)Alois P. Heinz, May 31 2012

Extensions

More terms from Alvin Hoover Belt, May 31 2012
Showing 1-2 of 2 results.