login
A144611
Sturmian word of slope 2-sqrt(2).
1
0, 1, 0, 1, 0, 1, 1, 0, 1, 0, 1, 1, 0, 1, 0, 1, 0, 1, 1, 0, 1, 0, 1, 1, 0, 1, 0, 1, 0, 1, 1, 0, 1, 0, 1, 1, 0, 1, 0, 1, 1, 0, 1, 0, 1, 0, 1, 1, 0, 1, 0, 1, 1, 0, 1, 0, 1, 0, 1, 1, 0, 1, 0, 1, 1, 0, 1, 0, 1, 1, 0, 1, 0, 1, 0, 1, 1, 0, 1, 0, 1, 1, 0, 1, 0, 1, 0, 1, 1, 0, 1, 0, 1, 1, 0, 1, 0, 1, 0, 1, 1, 0, 1, 0, 1
OFFSET
0,1
COMMENTS
Old name was: Sturmian word of slope 2.
Conjecture: a(n) = floor((n+1)*log(3)/log(2)) - floor(n*log(3)/log(2)) - 1.
This is not true: Let b(n) = floor((n+1)*log(3)/log(2)) - floor(n*log(3)/log(2)) - 1. Then b(40) = 0, whereas a(40) = 1. This is the first term at which a(n) and b(n) disagree. - Danny Rorabaugh, Mar 14 2015
From Benoit Cloitre, Oct 16 2016: (Start)
Let u(n) = n + floor(sqrt(2)*n) (A003151) and v(n) = n + floor(n/sqrt(2)) (A003152) then u,v form a partition of the positive integers and we have, for n >= 1, a(u(n))=0 and a(v(n))=1.
Another way to construct the sequence: merge the sequences x(n) = 2n^2+1 and y(n) = 4n^2 (n >= 1) into an increasing sequence z(n) which then begins: 3,4,9,16,19,33,36,51,64,73 (not in the OEIS). Then for n >= 1, a(n) = z(n) mod 2. (End)
From Michel Dekking, Feb 16 2020: (Start)
This sequence is a Sturmian sequence s(alpha,rho) with slope alpha = 2-sqrt(2), and intercept rho = 0.
In general, one passes from slope alpha to slope 1-alpha by exchanging 0 and 1. It therefore follows from the Comments of A006337 that (a(n+1)) is the unique fixed point of the morphism 0 -> 101, 1 -> 10. (End)
LINKS
M. Lothaire, Algebraic combinatorics on words, Cambridge University Press. Online publication date: April 2013; Print publication year: 2002.
Mike Winkler, On the structure and the behaviour of Collatz 3n+ 1 sequences, arXiv:1412.0519 [math.GM], 2014.
FORMULA
a(n) = floor((n+1)*alpha) - floor(n*alpha), where alpha = 2-sqrt(2). - Michel Dekking, Feb 16 2020
MATHEMATICA
christoffel[s_, M_] := Module[{n, x = 1, y = 0, ans = {0}}, Do[If[y + 1 <= s*x, AppendTo[ans, 1]; y++, AppendTo[ans, 0]; x++], {n, 1, M}]; ans] (* or Sturmian word, Jean-François Alcover, Sep 19 2016, A274170 *); christoffel[Sqrt[2], 105] (* Robert G. Wilson v, Feb 02 2017 *)
PROG
(Sage) #Generate the first n terms (plus a few) of the Sturmian word of slope a
def Sturmian(a, n):
y = 0
A = []
while len(A)<=n:
y += a
A.extend([0]+[1]*(floor(y)-floor(y-a)))
return A
Sturmian(sqrt(2), 104)
# Danny Rorabaugh, Mar 14 2015
(PARI) \\ to get N terms
a(n)=if(n<1, 0, vecsort(concat(vector(floor(sqrt(2)*N), i, 2*i^2+1), vector(N, j, 4*j^2)))[n]%2) \\ Benoit Cloitre, Oct 16 2016
CROSSREFS
See A144595 for further details. Cf. A006337.
Sequence in context: A361115 A082446 A191156 * A288473 A130853 A353810
KEYWORD
nonn
AUTHOR
N. J. A. Sloane, Jan 13 2009
EXTENSIONS
Name corrected by Michel Dekking, Feb 16 2020
STATUS
approved