login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A120614
a(n) = g(n+1) - g(n) where g(k) = floor(phi*floor(k/phi)) and phi = (1+sqrt(5))/2.
3
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, 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, 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
OFFSET
1,3
COMMENTS
From Michel Dekking, Oct 29 2018: (Start)
Here is a proof that (a(n)) is fixed point of the morphism 0->102, 1->102, 2->02.
Let alpha:=phi-1. Then alpha*phi = 1. So
g(k) = floor(phi*floor(k*alpha)).
Write k*alpha = floor(k*alpha) + {k*alpha}, i.e., {k*alpha} is the fractional part of k*alpha. Then
g(k) = floor(phi*(k*alpha-{k*alpha})) = k + floor(-phi*{k*alpha}).
Thus
a(n) = n+1 +floor(-phi*{(n+1)*alpha})-n -floor(-phi*{n*alpha}).
It follows that
a(n) = 1 - floor(phi*{(n+1)*alpha}) + floor(phi*{n*alpha}).
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.
In fact, phi*{n*alpha} can only take values between 0 and 1.619, and floor(phi*{n*alpha}) = 0 if and only if
{n*alpha} < 1/phi = alpha.
This is the same (putting rho:=1-alpha) as requiring
{n*alpha+rho} < 1-alpha.
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
a(n+1)=0 iff xF(n)=0, xF(n+1)=1,
a(n+1)=1 iff xF(n)=0, xF(n+1)=0,
a(n+1)=2 iff xF(n)=1, xF(n+1)=0.
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)
LINKS
F. Michel Dekking, Morphisms, Symbolic Sequences, and Their Standard Forms, Journal of Integer Sequences, Vol. 19 (2016), Article 16.1.1.
M. Lothaire, Algebraic Combinatorics on Words, Cambridge, 2002
FORMULA
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.
(a(n)) is a fixed point of the morphism 02-->10202 and 102-->10210202. [Corrected by Michel Dekking, Oct 29 2018]
Fixed point of the morphism 0->102, 1->102, 2->02. - Michel Dekking, Oct 21 2018
MAPLE
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
MATHEMATICA
#[[2]]-#[[1]]&/@Partition[Table[Floor[GoldenRatio*Floor[n/GoldenRatio]], {n, 0, 110}], 2, 1] (* Harvey P. Dale, Dec 14 2012 *)
PROG
(PARI) {phi=(1+sqrt(5))/2; g(k)=floor(phi*floor(k/phi))};
vector(100, n, g(n+1)-g(n)) \\ G. C. Greubel, Oct 23 2018
(Magma) [Floor((1+Sqrt(5))*Floor(2*(k+1)/(1+Sqrt(5)))/2) -
Floor((1+Sqrt(5))*Floor(2*k/(1+Sqrt(5)))/2): k in [1..100]]; // G. C. Greubel, Oct 23 2018
CROSSREFS
KEYWORD
nonn
AUTHOR
Benoit Cloitre, Jun 17 2006
EXTENSIONS
Initial 0 removed from data by Michel Dekking, Oct 22 2018
STATUS
approved