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.

A244226 Length of runs in A244221 (Greedy Catalan Base, A014418, reduced modulo 2).

This page as a plain text file.
%I A244226 #12 Jun 25 2014 13:12:40
%S A244226 1,1,1,1,2,1,1,1,2,1,1,1,1,1,1,1,2,1,1,1,2,1,1,1,1,1,1,1,2,1,1,1,2,1,
%T A244226 1,1,1,1,1,1,2,1,1,1,2,1,1,1,1,1,1,1,2,1,1,1,2,1,1,1,1,1,1,1,2,1,1,1,
%U A244226 2,1,1,1,1,1,1,1,2,1,1,1,2,1,1,1,1,1,1,1,2,1,1,1,2,1,1,1,1,1,1,1,2,1,1,1,2,1,1,1,1,1,1,1,3,1,1,1,2,1,1,1,2
%N A244226 Length of runs in A244221 (Greedy Catalan Base, A014418, reduced modulo 2).
%C A244226 Also the length of runs in A244220.
%C A244226 Note: The indexing of A244220 and A244221 starts from zero, so the starting offset of this sequence is zero also.
%H A244226 Antti Karttunen, <a href="/A244226/b244226.txt">Table of n, a(n) for n = 0..4120</a>
%e A244226 The first time we obtain value three at a(112) = 3, indicating that the first run of 3 in A244220 and A244221 starts at the position A244219(112) = 130, and indeed, it's the first time there are three consecutive "even" representations in Greedy Catalan Base:
%e A244226 A014418(130) = 30020,
%e A244226 A014418(131) = 30100,
%e A244226 A014418(132) = 100000,
%e A244226 A014418(133) = 100001.
%o A244226 (Scheme, with _Antti Karttunen_'s IntSeq-library)
%o A244226 (definec (A244226 n) (if (zero? n) 1 (let* ((prev_run_ends_at (A244218 (- n 1))) (prevpar (A244221 prev_run_ends_at))) (let loop ((i (+ 1 prev_run_ends_at))) (cond ((= (A244221 (+ i 1)) prevpar) (- i prev_run_ends_at)) (else (loop (+ i 1))))))))
%Y A244226 A244218 gives the partial sums (the ending points of corresponding runs), while A244219 gives the starting points.
%Y A244226 A244227 gives the even bisection, while the odd bisection is A000012 (all-1 sequence).
%K A244226 nonn
%O A244226 0,5
%A A244226 _Antti Karttunen_, Jun 23 2014