login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A120614 a(n) = g(n+1) - g(n) where g(k) = floor(phi*floor(k/phi)) and phi = (1+sqrt(5))/2. 3

%I #45 Sep 08 2022 08:45:26

%S 1,0,2,1,0,2,0,2,1,0,2,1,0,2,0,2,1,0,2,0,2,1,0,2,1,0,2,0,2,1,0,2,1,0,

%T 2,0,2,1,0,2,0,2,1,0,2,1,0,2,0,2,1,0,2,0,2,1,0,2,1,0,2,0,2,1,0,2,1,0,

%U 2,0,2,1,0,2,0,2,1,0,2,1,0,2,0,2,1,0,2,1,0,2,0,2,1,0,2,0,2,1,0,2,1,0,2,0

%N a(n) = g(n+1) - g(n) where g(k) = floor(phi*floor(k/phi)) and phi = (1+sqrt(5))/2.

%C From _Michel Dekking_, Oct 29 2018: (Start)

%C Here is a proof that (a(n)) is fixed point of the morphism 0->102, 1->102, 2->02.

%C Let alpha:=phi-1. Then alpha*phi = 1. So

%C g(k) = floor(phi*floor(k*alpha)).

%C Write k*alpha = floor(k*alpha) + {k*alpha}, i.e., {k*alpha} is the fractional part of k*alpha. Then

%C g(k) = floor(phi*(k*alpha-{k*alpha})) = k + floor(-phi*{k*alpha}).

%C Thus

%C a(n) = n+1 +floor(-phi*{(n+1)*alpha})-n -floor(-phi*{n*alpha}).

%C It follows that

%C a(n) = 1 - floor(phi*{(n+1)*alpha}) + floor(phi*{n*alpha}).

%C The difference -floor(phi*{(n+1)*alpha}) + floor(phi*{n*alpha}) is equal to -1, 0 or 1, since floor(phi*{n*alpha}) is equal to 0 or 1.

%C In fact, phi*{n*alpha} can only take values between 0 and 1.619, and floor(phi*{n*alpha}) = 0 if and only if

%C {n*alpha} < 1/phi = alpha.

%C This is the same (putting rho:=1-alpha) as requiring

%C {n*alpha+rho} < 1-alpha.

%C Via the rotation description of Sturmian sequences (see, e.g., Lothaire), one sees that this sequence is the inhomogeneous Sturmian sequence s(alpha, rho), but with offset 1, and with 0 and 1 exchanged. Since rho+alpha=1, it follows that s(alpha, rho) with offset 2 equals s(1-alpha, 1-alpha), the classical Fibonacci sequence xF:=A003849, fixed point of 0->01, 1->0. We have found that

%C a(n+1)=0 iff xF(n)=0, xF(n+1)=1,

%C a(n+1)=1 iff xF(n)=0, xF(n+1)=0,

%C a(n+1)=2 iff xF(n)=1, xF(n+1)=0.

%C This means that (a(n+1)) equals the 3-symbol Fibonacci sequence A270788 on the alphabet {0,2,1}. Then Proposition 5 in "Morphisms, Symbolic Sequences, and Their Standard Forms" yields that (a(n)) is fixed point of the morphism 0->102, 1->102, 2->02. (End)

%H Muniru A Asiru, <a href="/A120614/b120614.txt">Table of n, a(n) for n = 1..1000</a>

%H F. Michel Dekking, <a href="https://cs.uwaterloo.ca/journals/JIS/VOL19/Dekking/dekk4.html">Morphisms, Symbolic Sequences, and Their Standard Forms</a>, Journal of Integer Sequences, Vol. 19 (2016), Article 16.1.1.

%H M. Lothaire, <a href="http://www-igm.univ-mlv.fr/~berstel/Lothaire/">Algebraic Combinatorics on Words</a>, Cambridge, 2002

%F a(floor(k*phi)+k+1)=0; a(floor(k*phi)+k+2)=2, if n is not in {floor(k*phi)+k+1}U{floor(k*phi)+k+2}_{k>=1} a(n)=1.

%F (a(n)) is a fixed point of the morphism 02-->10202 and 102-->10210202. [Corrected by _Michel Dekking_, Oct 29 2018]

%F Fixed point of the morphism 0->102, 1->102, 2->02. - _Michel Dekking_, Oct 21 2018

%p g:=k->floor((1+sqrt(5))/2*floor(k/((1+sqrt(5))/2))): seq(g(n+1)-g(n),n=1..110); # _Muniru A Asiru_, Oct 21 2018

%t #[[2]]-#[[1]]&/@Partition[Table[Floor[GoldenRatio*Floor[n/GoldenRatio]],{n,0,110}],2,1] (* _Harvey P. Dale_, Dec 14 2012 *)

%o (PARI) {phi=(1+sqrt(5))/2; g(k)=floor(phi*floor(k/phi))};

%o vector(100, n, g(n+1)-g(n)) \\ _G. C. Greubel_, Oct 23 2018

%o (Magma) [Floor((1+Sqrt(5))*Floor(2*(k+1)/(1+Sqrt(5)))/2) -

%o Floor((1+Sqrt(5))*Floor(2*k/(1+Sqrt(5)))/2): k in [1..100]]; // _G. C. Greubel_, Oct 23 2018

%Y Cf. A003849, A120613, A120615, A270788.

%K nonn

%O 1,3

%A _Benoit Cloitre_, Jun 17 2006

%E Initial 0 removed from data by _Michel Dekking_, Oct 22 2018

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 3 15:50 EDT 2024. Contains 372221 sequences. (Running on oeis4.)