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.

A157129 An analog of the Kolakoski sequence A000002, only now a(n) = (length of n-th run divided by 2) using 1 and 2 and starting with 1,1.

This page as a plain text file.
%I A157129 #26 Dec 31 2024 20:16:30
%S A157129 1,1,2,2,1,1,1,1,2,2,2,2,1,1,2,2,1,1,2,2,1,1,1,1,2,2,2,2,1,1,1,1,2,2,
%T A157129 2,2,1,1,2,2,1,1,1,1,2,2,2,2,1,1,2,2,1,1,1,1,2,2,2,2,1,1,2,2,1,1,2,2,
%U A157129 1,1,1,1,2,2,2,2,1,1,1,1,2,2,2,2,1,1,2,2,1,1,2,2,1,1,1,1,2,2,2,2,1,1,1,1,2
%N A157129 An analog of the Kolakoski sequence  A000002, only now a(n) = (length of n-th run divided by 2) using 1 and 2 and starting with 1,1.
%F A157129 As for the Kolakoski sequence we suspect Sum_{k=1..n} a(k) = (3/2)*n + o(n).
%F A157129 a(n) = A071928(n)/2. - _Jon Maiga_, Jun 04 2021
%F A157129 a(n) = gcd(A284796(ceiling(n/2)), 2) (conjectured). - _Jon Maiga_, Jun 11 2021
%F A157129 Generated by infinitely iterating the morphism a->abc, b->dab, c->efg, d->hcd, e->cda, f->bef, g->ghc, h->dab starting with a, obtaining the infinite word abcdabefg..., and then replacing a,b,e,f by 1 and c,d,g,h by 2. Using Walnut, one can then prove the above claim about Sum_{k=1..n} a(k) in the stronger form Sum_{k=1..n} a(k) = (3/2)*n + O(1). _Jeffrey Shallit_, Dec 31 2024
%e A157129 The third run is 1,1,1,1, which is of length 4, thus a(3) = 4/2 = 2.
%o A157129 (PARI) w=[1,1];for(n=2,1000,for(i=1,2*w[n],w=concat(w,1+(n+1)%2))); w \\ Corrected by _Kevin Ryde_ and _Jon Maiga_, Jun 11 2021
%Y A157129 Cf. A000002, A071928, A229785, A284796.
%K A157129 nonn
%O A157129 1,3
%A A157129 _Benoit Cloitre_, Feb 23 2009