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”).

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

%I #53 Sep 08 2022 08:46:14

%S 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,

%T 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,

%U 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

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

%C 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.

%C From _Michel Dekking_, Feb 11 2018: (Start)

%C (a(n)) is the unique fixed point of the morphism alpha given by

%C alpha: 0 -> 012, 1 -> 012, 2 -> 0.

%C 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

%C w(0) = 0, w(1) = 012, w(i+2) = w(i+1)w(i+1)w(i).

%C 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_{i-1}. 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_{i-2}. 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):

%C w(i+1) = w(i)w(i)w(i-1) = alpha^i(0) alpha^i(0) alpha^{i-1}(0) =

%C alpha^i(0) alpha^i(1)alpha^i(2) = alpha^i(012) = alpha^{i+1}(0).

%C (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)

%H Michel Dekking, <a href="/A263844/b263844.txt">Table of n, a(n) for n = 1..5000</a>

%H Aviezri S. Fraenkel, <a href="http://dx.doi.org/10.1016/S0012-365X(00)00138-2">On the recurrence f(m+1)= b(m)*f(m)-f(m-1) and applications</a>, Discrete Mathematics 224 (2000), pp. 273-279.

%H A. S. Fraenkel, <a href="/A263844/a263844.png">An exotic ternary representation of the first few positive integers</a> (Table 2 from Fraenkel (2000).)

%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.

%F a(n) = floor((n+2)r) + floor((n+1)r) - 2*floor(nr), where r = 1 - 1/sqrt(2). - _Michel Dekking_, Feb 11 2018

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

%t 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 *)

%o (Magma) [Floor((n+2)*(1-1/Sqrt(2)))+Floor((n+1)*(1-1/Sqrt(2)))- 2*Floor(n*(1-1/Sqrt(2))): n in [1..100]]; // _Vincenzo Librandi_, Feb 12 2018

%Y Cf. A001333, A270788.

%K nonn

%O 1,3

%A _N. J. A. Sloane_, Nov 06 2015

%E More terms and new offset from _Michel Dekking_, Feb 11 2018