|
Search: id:A007305
|
|
|
| A007305 |
|
Numerators of Farey (or Stern-Brocot) tree fractions. (Formerly M0113)
|
|
+0 31
|
|
| 0, 1, 1, 1, 2, 1, 2, 3, 3, 1, 2, 3, 3, 4, 5, 5, 4, 1, 2, 3, 3, 4, 5, 5, 4, 5, 7, 8, 7, 7, 8, 7, 5, 1, 2, 3, 3, 4, 5, 5, 4, 5, 7, 8, 7, 7, 8, 7, 5, 6, 9, 11, 10, 11, 13, 12, 9, 9, 12, 13, 11, 10, 11, 9, 6, 1, 2, 3, 3, 4, 5, 5, 4, 5, 7, 8, 7, 7, 8, 7, 5, 6, 9, 11, 10, 11, 13, 12, 9, 9, 12, 13, 11
(list; graph; listen)
|
|
|
OFFSET
|
0,5
|
|
|
REFERENCES
|
R. L. Graham, D. E. Knuth and O. Patashnik, Concrete Mathematics. Addison-Wesley, Reading, MA, 1990, p. 117.
G. H. Hardy and E. M. Wright, An Introduction to the Theory of Numbers. 3rd ed., Oxford Univ. Press, 1954, p. 23.
J. C. Lagarias, Number Theory and Dynamical Systems, pp. 35-72 of S. A. Burr, ed., The Unreasonable Effectiveness of Number Theory, Proc. Sympos. Appl. Math., 46 (1992). Amer. Math. Soc.
W. J. LeVeque, Topics in Number Theory. Addison-Wesley, Reading, MA, 2 vols., 1956, Vol. 1, p. 154.
G. Melancon, Lyndon factorization of sturmian words, Discr. Math., 210 (2000), 137-149.
I. Niven and H. S. Zuckerman, An Introduction to the Theory of Numbers. 2nd ed., Wiley, NY, 1966, p. 141.
|
|
LINKS
|
Index entries for sequences related to Stern's sequences
A. Bogomolny, Stern-Brocot Tree
A. Bogomolny, Inspiration for Maple code
N. J. A. Sloane, Stern-Brocot or Farey Tree
G. A. Jones, The Farey graph
|
|
FORMULA
|
a(n) = SternBrocotTreeNum(n-1) # n starting from 2 gives the sequence from 1, 1, 2, 1, 2, 3, 3, 1, 2, 3, 3, 4, 5, 5, 4, 1, ...
|
|
EXAMPLE
|
[ 0/1; 1/1; ] 1/2; 1/3, 2/3; 1/4, 2/5, 3/5, 3/4; 1/5, 2/7, 3/8, 3/7, 4/7, 5/8, 5/7, 4/5;...
|
|
MAPLE
|
SternBrocotTreeNum := proc(n) option remember; local msb, r; if(n < 2) then RETURN(n); fi; msb := floor_log_2(n); r := n - (2^msb); if(floor_log_2(r) = (msb-1)) then RETURN(SternBrocotTreeNum(r) + SternBrocotTreeNum(((3*(2^(msb-1)))-r)-1)); else RETURN(SternBrocotTreeNum((2^(msb-1))+r)); fi; end;
|
|
CROSSREFS
|
Cf. A007306, A006842, A006843, A047679, A054424, A057114.
Sequence in context: A035531 A118977 A071766 this_sequence A112531 A100002 A057041
Adjacent sequences: A007302 A007303 A007304 this_sequence A007306 A007307 A007308
|
|
KEYWORD
|
nonn,frac,tabf,nice
|
|
AUTHOR
|
njas
|
|
EXTENSIONS
|
Maple code from Antti Karttunen, Mar 19 2000
|
|
|
Search completed in 0.002 seconds
|