%I #8 May 07 2016 12:30:12
%S 1,0,1,2,3,5,8,11,19,30,49,68,87,106,193,299,492,685,878,1071,1264,
%T 1457,2721,4178,6899,9620,12341,15062,17783,20504,23225,25946,49171,
%U 75117,124288,173459,222630,271801,320972,370143,419314,468485,517656,566827
%N Numerators of "Farey fraction" approximations to e.
%C "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, 3/1. Now 3/1 is too big, so add 2/1 to make the fraction smaller: 5/2, 8/3, 11/4. Now 11/4 is too small, so add 8/3 to make the fraction bigger: 19/7, ...
%H Dave Rusin, <a href="http://www.math.niu.edu/~rusin/known-math/99/farey">Farey fractions on sci.math</a> [Broken link]
%H Dave Rusin, <a href="/A002965/a002965.txt">Farey fractions on sci.math</a> [Cached copy]
%e The fractions are 1/0, 0/1, 1/1, 2/1, 3/1, 5/2, 8/3, 11/4, 19/7, ...
%t 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};
%t Join[{m, m + 1}, NestList[# /. r &, f0, n - 3][[All, 2]]]); Join[{1, 0, 1 }, f[E, 41]] // Numerator
%t (* _Jean-François Alcover_, May 18 2011 *)
%Y For another version see A006258.
%Y Cf. A097545, A097546 gives the similar sequence for pi. A119015 gives the denominators for this sequence.
%K easy,frac,nonn
%O 0,4
%A _Joshua Zucker_, May 08 2006