login
A270226
a(n) is the number of terms in the n-th block of consecutive integers of A136119.
0
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, 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, 2, 3, 2, 3, 2, 2, 3, 2, 3, 2, 3, 2, 2, 3
OFFSET
1,2
COMMENTS
Conjecture: Partial average of the sequence converges to 1+sqrt(2).
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
FORMULA
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
EXAMPLE
From A136119 consecutive blocks are
1 a(1)=1,
3, 4, 5 a(2)=3,
7, 8 a(3)=2,
10, 11 a(4)=2,
13, 14, 15 a(5)=3.
PROG
(C)
#include <stdio.h>
#include <math.h>
int main(){
int i, a, b; int j=0;
for(i=2; i<200; i++){
a=ceil((i-0.5)*sqrt(2));
b=ceil((i-1.5)*sqrt(2));
if(a-b==1)j++;
else{j++; printf("%d, ", j); j=0; }
}
return 0;
}
CROSSREFS
Cf. A136119.
Sequence in context: A122028 A340300 A245070 * A305534 A248138 A049234
KEYWORD
nonn
AUTHOR
STATUS
approved