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.

A270226 a(n) is the number of terms in the n-th block of consecutive integers of A136119.

This page as a plain text file.
%I A270226 #16 Jan 23 2017 00:43:36
%S A270226 1,3,2,2,3,2,3,2,3,2,2,3,2,3,2,2,3,2,3,2,2,3,2,3,2,3,2,2,3,2,3,2,2,3,
%T A270226 2,3,2,3,2,2,3,2,3,2,2,3,2,3,2,3,2,2,3,2,3,2,2,3,2,3,2,2,3,2,3,2,3,2,
%U A270226 2,3,2,3,2,2,3,2,3,2,3,2,2,3
%N A270226 a(n) is the number of terms in the n-th block of consecutive integers of A136119.
%C A270226 Conjecture: Partial average of the sequence converges to 1+sqrt(2).
%C A270226 Proof of the conjecture: since A136119(n+1) - A136119(n) = A001030(n), the sequence (a(n+1)) is the fixed point of the substitution sigma: 2->32, 3->322. Here one uses that since sigma(a)=a, the length of the n-th block is coded by the n-th letter.  Since the frequencies of 2 and 3 in this fixed point are respectively sqrt(2)/(1+sqrt(2)) and 1/(1+sqrt(2)), the conjecture follows. (Alternatively: (a(n+1)-2)  is  a Sturmian sequence with density sqrt(2)-1). - _Michel Dekking_, Jan 22 2017
%F A270226 a(1)=1, a(n+1) = floor(n*sqrt(2)+1/sqrt(2)) - floor((n-1)*sqrt(2)+1/sqrt(2)) + 1. - _Michel Dekking_, Jan 22 2017
%e A270226 From A136119 consecutive blocks are
%e A270226 1          a(1)=1,
%e A270226 3, 4, 5    a(2)=3,
%e A270226 7, 8       a(3)=2,
%e A270226 10, 11     a(4)=2,
%e A270226 13, 14, 15 a(5)=3.
%o A270226 (C)
%o A270226 #include <stdio.h>
%o A270226 #include <math.h>
%o A270226 int main(){
%o A270226 int i,a,b; int j=0;
%o A270226 for(i=2; i<200; i++){
%o A270226         a=ceil((i-0.5)*sqrt(2));
%o A270226         b=ceil((i-1.5)*sqrt(2));
%o A270226         if(a-b==1)j++;
%o A270226         else{j++; printf("%d,",j); j=0;}
%o A270226 }
%o A270226 return 0;
%o A270226 }
%Y A270226 Cf. A136119.
%K A270226 nonn
%O A270226 1,2
%A A270226 _Benedict W. J. Irwin_, Mar 13 2016