

A263844


Constant term in expansion of n in Fraenkel's exotic ternary representation.


3



0, 1, 2, 0, 1, 2, 0, 0, 1, 2, 0, 1, 2, 0, 0, 1, 2, 0, 1, 2, 0, 1, 2, 0, 0, 1, 2, 0, 1, 2, 0, 0, 1, 2, 0, 1, 2, 0, 1, 2, 0, 0, 1, 2, 0, 1, 2, 0, 0, 1, 2, 0, 1, 2, 0, 0, 1, 2, 0, 1, 2, 0, 1, 2, 0, 0, 1, 2, 0, 1, 2, 0, 0, 1, 2, 0, 1, 2, 0, 1, 2, 0, 0, 1, 2, 0, 1, 2, 0, 0, 1, 2, 0, 1, 2, 0, 0, 1, 2, 0, 1, 2, 0, 1, 2, 0, 0, 1, 2
(list;
graph;
refs;
listen;
history;
text;
internal format)



OFFSET

1,3


COMMENTS

Let {p_i, i >= 0} = {1,3,7,17,41,99,...} denote the numerators of successive convergents to sqrt(2) (see A001333). Then any n >= 0 has a unique representation as n = Sum_{i >= 0} d_i*p_i, with 0 <= d_i <= 2, d_{i+1}=2 => d_i=0. Sequence gives a(n+1) = d_0.
(a(n)) is the unique fixed point of the morphism alpha given by
alpha: 0 > 012, 1 > 012, 2 > 0.
To see this, note first that the p_i satisfy p_{i+2}=2p_{i+1}+p_i for all i=1,2,... Then define a sequence of words by
w(0) = 0, w(1) = 012, w(i+2) = w(i+1)w(i+1)w(i).
The length of w(i) is equal to p_i. In the numeration system, the representation of n = p_i is d = 10..0, and the representation of n = 2p_i is d = 20..0. By unicity of the representation, the numbers n = p_i +m have the representation d = 1c, where c is the representation of m for m = 1,...,p_{i1}. Similarly, because the digit 2 is required to be followed by the digit 0, the numbers n = 2p_i + m have the representation d =20c, where c is the representation of m for m = 1,...,p_{i2}. It follows from this that the d_0 digits in the range 0 to p_{i+2} have to satisfy the equation w(i+2) = w(i+1)w(i+1)w(i). But alpha(0)=alpha(1)=w(1), and alpha(2)=w(0), which implies by induction that w(i) = alpha^i(0):
w(i+1) = w(i)w(i)w(i1) = alpha^i(0) alpha^i(0) alpha^{i1}(0) =
alpha^i(0) alpha^i(1)alpha^i(2) = alpha^i(012) = alpha^{i+1}(0).
(a(n)) is modulo a change of alphabet (0>1, 1>2, 2>3) equal to A294180, the standard form of (a(n)). This combined with the fact that the Pell word A171588 is a Sturmian word leads to the formula for (a(n)) below. (End)


LINKS



FORMULA

a(n) = floor((n+2)r) + floor((n+1)r)  2*floor(nr), where r = 1  1/sqrt(2).  Michel Dekking, Feb 11 2018


EXAMPLE

See the link to Table 2 of Fraenkel (2000).


MATHEMATICA

Table[Floor[(n + 2) (1  1/Sqrt[2])] + Floor[(n + 1) (1  1/Sqrt[2])]  2 Floor[n (1  1/Sqrt[2])], {n, 100}] (* Vincenzo Librandi, Feb 12 2018 *)


PROG

(Magma) [Floor((n+2)*(11/Sqrt(2)))+Floor((n+1)*(11/Sqrt(2))) 2*Floor(n*(11/Sqrt(2))): n in [1..100]]; // Vincenzo Librandi, Feb 12 2018


CROSSREFS



KEYWORD

nonn


AUTHOR



EXTENSIONS



STATUS

approved



