cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A006340 An "eta-sequence": [ (n+1)*tau + 1/2 ] - [ n*tau + 1/2 ], tau = (1 + sqrt(5))/2.

Original entry on oeis.org

2, 1, 2, 1, 2, 2, 1, 2, 2, 1, 2, 1, 2, 2, 1, 2, 2, 1, 2, 1, 2, 2, 1, 2, 1, 2, 2, 1, 2, 2, 1, 2, 1, 2, 2, 1, 2, 1, 2, 2, 1, 2, 2, 1, 2, 1, 2, 2, 1, 2, 2, 1, 2, 1, 2, 2, 1, 2, 1, 2, 2, 1, 2, 2, 1, 2, 1, 2, 2, 1, 2, 1, 2, 2, 1, 2, 2, 1, 2, 1, 2, 2, 1, 2, 2, 1, 2, 1, 2, 2, 1, 2, 1
Offset: 0

Views

Author

D. R. Hofstadter, Jul 15 1977

Keywords

Comments

Equals its own "derivative", which is formed by counting the strings of 1's that lie between 2's.
Conjecture: A006340 = continued fraction expansion of (2.729967741... = sup{f(n,1)}), where f(1,x) = x + 1 and thereafter f(n,x) = x + 1 if n is in the lower Wythoff sequence (A000201), else f(n,x) = 1/x. The first 12 values of f(n,1) are given in Example at A245216. - Clark Kimberling, Jul 14 2014
From Michel Dekking, Mar 05 2018: (Start)
The description of this sequence is not correct, since the derivative of a equals
a' = 1,2,2,1,2,2,1,2,1,2,2,1,2,1,2,2,...
The claim by Hofstadter in formula (4) in the 1977 letter to Sloane is also not correct, since the second derivative of a is equal to
a'' = 2,2,1,2,1,2,2,1,2,1,2,2,1,...
so a is not equal to its own second derivative.
Nevertheless, this sequence has a self-similarity property: if one replaces every chunk 212 with 1 and every chunk 21212 with 2, then one obtains back the original sequence. In other words, (a(n)) is the unique fixed point of the morphism sigma given by sigma: 1->212, 2->21212.
This can be proved following the ideas of Chapter 2 in Lothaire's book and Section 4 of my paper "Substitution invariant Sturmian words and binary trees".
To comply with these references change the alphabet to {0,1}. This changes sigma into the morphism 0->101, 1->10101.
The fractional part {tau} of tau is larger than 1/2; as it is convenient to have it smaller than 1/2 we change to beta = 1-tau = (3-sqrt(5))/2.
This changes the morphism 0->101, 1->10101 to its mirror image psi given by 0->01010, 1->010.
Let psi_1 and psi_2 be the elementary Sturmian morphisms given by
psi_1(0)=01 , psi_1(1)=1, psi_2(0)=10, psi_2(1)=0.
Then psi = psi_2^2 psi_1.
This already shows that psi generates a Sturmian sequence with certain parameters alpha and rho: s(alpha,rho) = ([(n+1)*alpha+rho]-[n*alpha+rho]).
Since psi is the composition psi_2^2psi_1, the parameters of s(alpha,rho) are given by the composition T:=T_2^2T_1 of the fractional linear maps
T_1(x,y) = ((1-x)/(2-x),(1-y)/(2-x)),
T_2(x,y) = ((1-x)/(2-x), (2-x-y)/(2-x)).
Since one can verify that T(beta,1/2)=(beta,1/2), it follows that
alpha = beta, and rho = 1/2.
(End)

References

  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Differs from A014675 in many places. Cf. A245216.

Programs

  • Mathematica
    Differences[ Table[ Round[ GoldenRatio*n], {n, 0, 93}]] (* Jean-François Alcover, Aug 13 2012 *)
  • PARI
    rt(n) = my(tau=(1 + sqrt(5))/2); round(tau*n)
    a(n) = rt(n+1)-rt(n) \\ Felix Fröhlich, Aug 26 2018

Extensions

Extended by N. J. A. Sloane, Nov 07 2001