login
This site is supported by donations to The OEIS Foundation.
Logo

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A119016 Numerators of "Farey fraction" approximations to sqrt(2). 5
1, 0, 1, 2, 3, 4, 7, 10, 17, 24, 41, 58, 99, 140, 239, 338, 577, 816, 1393, 1970, 3363, 4756, 8119, 11482, 19601, 27720, 47321, 66922, 114243, 161564, 275807, 390050, 665857, 941664, 1607521, 2273378, 3880899, 5488420, 9369319, 13250218, 22619537, 31988856 (list; graph; refs; listen; history; internal format)
OFFSET

0,4

COMMENTS

"Add" (meaning here to add the numerators and add the denominators, not to add the fractions) 1/0 to 1/1 to make the fraction bigger: 2/1. Now 2/1 is too big, so add 1/1 to make the fraction smaller: 3/2, 4/3. Now 4/3 is too small, so add 3/2 to make the fraction bigger: 7/5, 10/7, ... Because the continued fraction for sqrt(2) is all 2s, it will always take exactly two terms here to switch from a number that's bigger than sqrt(2) to one that's less. a(n+2) = A082766(n).

LINKS

Dave Rusin, Farey fractions on sci.math

FORMULA

a(0) = 1, a(1) = 0, a(2n) = a(2n-1) + a(2n-2), a(2n+1) = a(2n) + a(2n-2).

G.f. (1 - x^2 + 2*x^3)/(1 - 2*x^2 - x^4).  [Joerg Arndt, Feb 14 2012]

EXAMPLE

The fractions are 1/0, 0/1, 1/1, 2/1, 3/2, 4/3, 7/5, 10/7, 17/12, ...

MATHEMATICA

f[x_, n_] := (m = Floor[x]; f0 = {m, m+1/2, m+1}; r = ({a___, b_, c_, d___} /; b < x < c) :> {b, (Numerator[b] + Numerator[c]) / (Denominator[b] + Denominator[c]), c};

Join[{m, m+1}, NestList[# /. r &, f0, n-3][[All, 2]]]);

Join[{1, 0 }, f[Sqrt[2], 38]] // Numerator

(* From Jean-François Alcover, May 18 2011 *)

LinearRecurrence[{0, 2, 0, 1}, {1, 2, 3, 4}, 40] (* and *) t = {1, 2}; Do[AppendTo[t, t[[-2]] + t[[-1]]]; AppendTo[t, t[[-3]] + t[[-1]]], {n, 30}]; t (* From Vladimir Joseph Stephan Orlovsky, Feb 13 2012 *)

CROSSREFS

Cf. A097545, A097546 gives the similar sequence for pi. A119014, A119015 gives the similar sequence for e. A002965 gives the denominators for this sequence. A082766 is a(n+2). Also very closely related to A001333, A052542 and A000129.

See A082766 for another version.

Sequence in context: A018143 A136570 A082766 * A082958 A166012 A060166

Adjacent sequences:  A119013 A119014 A119015 * A119017 A119018 A119019

KEYWORD

easy,frac,nonn,changed

AUTHOR

Joshua Zucker (joshua.zucker(AT)stanfordalumni.org), May 08 2006

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Transforms | Puzzles | Hot | Classics
Recent Additions | More pages | Superseeker | Maintained by The OEIS Foundation Inc.

Content is available under The OEIS End-User License Agreement .

Last modified February 16 07:38 EST 2012. Contains 205880 sequences.