Logo

Greetings from The On-Line Encyclopedia of Integer Sequences!

Hints

Search: id:A047679
Displaying 1-1 of 1 results found. page 1
     Format: long | short | internal | text      Sort: relevance | references | number      Highlight: on | off
A047679 Denominator in full Stern-Brocot tree. +0
14
1, 2, 1, 3, 3, 2, 1, 4, 5, 5, 4, 3, 3, 2, 1, 5, 7, 8, 7, 7, 8, 7, 5, 4, 5, 5, 4, 3, 3, 2, 1, 6, 9, 11, 10, 11, 13, 12, 9, 9, 12, 13, 11, 10, 11, 9, 6, 5, 7, 8, 7, 7, 8, 7, 5, 4, 5, 5, 4, 3, 3, 2, 1, 7, 11, 14, 13, 15, 18, 17, 13, 14, 19, 21, 18, 17, 19, 16, 11, 11, 16, 19, 17, 18 (list; graph; listen)
OFFSET

0,2

COMMENT

Write n in binary; list run lengths; add 1 to last run length; make into continued fraction. Sequence gives denominator of fraction obtained.

LINKS

N. J. A. Sloane, Stern-Brocot or Farey Tree

Index entries for sequences related to Stern's sequences

FORMULA

a(n) = SternBrocotTreeDen(n) # n starting from 1.

EXAMPLE

E.g. 57->111001->[ 3,2,1 ]->[ 3,2,2 ]->3 + 1/(2 + 1/(2) ) = 17/2. For n=1,2,... we get 2, 3/2, 3, 4/3, 5/3, 5/2, 4, 5/4, 7/5, 8/5,...

1; 2,1; 3,3,2,1; 4,5,5,4,3,3,2,1; ....

MAPLE

SternBrocotTreeDen := n -> SternBrocotTreeNum(((3*(2^floor_log_2(n)))-n)-1); # SternBrocotTreeNum given in A007305 and (((3*(2^floor_log_2(n)))-n)-1) is equal to A054429[n].

MATHEMATICA

Needs[ "NumberTheory`ContinuedFractions`" ]; CFruns[ n_Integer ] := Fold[ #2+1/#1&, \[ Infinity ], Reverse[ MapAt[ #+1&, Length/@Split[ IntegerDigits[ n, 2 ] ], {-1} ] ] ]

CROSSREFS

Numerators are A007305. Cf. A054424.

Adjacent sequences: A047676 A047677 A047678 this_sequence A047680 A047681 A047682

Sequence in context: A121436 A088074 A071463 this_sequence A035050 A046819 A089216

KEYWORD

nonn,easy,frac,nice,tabf

AUTHOR

Wouter Meeussen (wouter.meeussen(AT)pandora.be)

page 1

Search completed in 0.002 seconds

Lookup | Welcome | Find friends | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Transforms | Puzzles | Hot | Classics
More pages | Superseeker | Maintained by N. J. A. Sloane (njas@research.att.com)

Last modified October 11 09:12 EDT 2008. Contains 144832 sequences.


AT&T Labs Research