[go: up one dir, main page]

login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
Search: a097546 -id:a097546
Displaying 1-6 of 6 results found. page 1
     Sort: relevance | references | number | modified | created      Format: long | short | data
A001203 Simple continued fraction expansion of Pi.
(Formerly M2646 N1054)
+10
52
3, 7, 15, 1, 292, 1, 1, 1, 2, 1, 3, 1, 14, 2, 1, 1, 2, 2, 2, 2, 1, 84, 2, 1, 1, 15, 3, 13, 1, 4, 2, 6, 6, 99, 1, 2, 2, 6, 3, 5, 1, 1, 6, 8, 1, 7, 1, 2, 3, 7, 1, 2, 1, 1, 12, 1, 1, 1, 3, 1, 1, 8, 1, 1, 2, 1, 6, 1, 1, 5, 2, 2, 3, 1, 2, 4, 4, 16, 1, 161, 45, 1, 22, 1, 2, 2, 1, 4, 1, 2, 24, 1, 2, 1, 3, 1, 2, 1 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,1
COMMENTS
The first 5821569425 terms were computed by Eric W. Weisstein on Sep 18 2011.
The first 10672905501 terms were computed by Eric W. Weisstein on Jul 17 2013.
The first 15000000000 terms were computed by Eric W. Weisstein on Jul 27 2013.
The first 30113021586 terms were computed by Syed Fahad on Apr 27 2021.
REFERENCES
P. Beckmann, "A History of Pi".
C. Brezinski, History of Continued Fractions and Padé Approximants, Springer-Verlag, 1991; pp. 151-152.
J. R. Goldman, The Queen of Mathematics, 1998, p. 50.
R. S. Lehman, A Study of Regular Continued Fractions. Report 1066, Ballistic Research Laboratories, Aberdeen Proving Ground, Maryland, Feb 1959.
G. Lochs, Die ersten 968 Kettenbruchnenner von Pi. Monatsh. Math. 67 1963 311-316.
C. D. Olds, Continued Fractions, Random House, NY, 1963; front cover of paperback edition.
N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
LINKS
N. J. A. Sloane, Table of n, a(n) for n = 0..19999 [from the Plouffe web page]
E. Bombieri and A. J. van der Poorten, Continued fractions of algebraic numbers
K. Y. Choong, D. E. Daykin and C. R. Rathbone, Regular continued fractions for pi and gamma, Math. Comp., 25 (1971), 403.
Sebastian M. Cioabă and Werner Linde, A Bridge to Advanced Mathematics: from Natural to Complex Numbers, Amer. Math. Soc. (2023) Vol. 58, see page 360.
Francesco Dolce and Pierre-Adrien Tahay, Column representation of Sturmian words in cellular automata, Czech Technical University (Prague, Czechia, 2022).
Eduardo Dorrego López and Elías Fuentes Guillén, An Annotated Translation of Lambert's Vorläufige Kenntnisse (1766/1770), In: Irrationality, Transcendence and the Circle-Squaring Problem. Logic, Epistemology, and the Unity of Science (LEUS 2023) Springer, Cham. Vol 58.
Bill Gosper, answer to: Did Gosper or the Borweins first prove Ramanujans formula?, History of Science and Mathematics Stack Exchange, April 2020.
Bill Gosper and Julian Ziegler Hunts, Animation
B. Gourevitch, L'univers de Pi
Hans Havermann, Simple Continued Fraction for Pi [a 483 MB file containing 180 million terms]
Maxim Sølund Kirsebom, Extreme Value Theory for Hurwitz Complex Continued Fractions, Entropy (2021) Vol. 23, No. 7, 840.
Antony Lee, Diophantine Approximation and Dynamical Systems, Master's Thesis, Lund University (Sweden 2020).
Sophie Morier-Genoud and Valentin Ovsienko, On q-deformed real numbers, arXiv:1908.04365 [math.QA], 2019.
Ed Pegg, Jr., Sequence Pictures, Math Games column, Dec 08 2003.
Ed Pegg, Jr., Sequence Pictures, Math Games column, Dec 08 2003 [Cached copy, with permission (pdf only)]
Simon Plouffe, 20 megaterms of this sequence as computed by Hans Havermann, starting in file CFPiTerms20aa.txt
Denis Roegel, Lambert's proof of the irrationality of Pi: Context and translation, hal-02984214 [math.HO], 2020.
N. J. A. Sloane, "A Handbook of Integer Sequences" Fifty Years Later, arXiv:2301.03149 [math.NT], 2023, p. 5.
Eric Weisstein's World of Mathematics, Pi Continued Fraction
Eric Weisstein's World of Mathematics, Pi
G. Xiao, Contfrac
EXAMPLE
Pi = 3.1415926535897932384...
= 3 + 1/(7 + 1/(15 + 1/(1 + 1/(292 + ...))))
= [a_0; a_1, a_2, a_3, ...] = [3; 7, 15, 1, 292, ...].
MAPLE
cfrac (Pi, 70, 'quotients'); # Zerinvary Lajos, Feb 10 2007
MATHEMATICA
ContinuedFraction[Pi, 98]
PROG
(PARI) contfrac(Pi) \\ contfracpnqn(%) is also useful!
(PARI) { allocatemem(932245000); default(realprecision, 21000); x=contfrac(Pi); for (n=1, 20000, write("b001203.txt", n, " ", x[n])); } \\ Harry J. Smith, Apr 14 2009
(Sage) continued_fraction(RealField(333)(pi)) # Peter Luschny, Feb 16 2015
(Python)
import itertools as it; import sympy as sp
list(it.islice(sp.continued_fraction_iterator(sp.pi), 100))
CROSSREFS
Cf. A000796 for decimal expansion. See A007541 or A033089, A033090 for records.
KEYWORD
nonn,nice,cofr
AUTHOR
EXTENSIONS
Word "Simple" added to the title by David Covert, Dec 06 2016
STATUS
approved
A002965 Interleave denominators (A000129) and numerators (A001333) of convergents to sqrt(2).
(Formerly M0671)
+10
28
0, 1, 1, 1, 2, 3, 5, 7, 12, 17, 29, 41, 70, 99, 169, 239, 408, 577, 985, 1393, 2378, 3363, 5741, 8119, 13860, 19601, 33461, 47321, 80782, 114243, 195025, 275807, 470832, 665857, 1136689, 1607521, 2744210, 3880899, 6625109, 9369319, 15994428, 22619537 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,5
COMMENTS
Denominators of Farey fraction approximations to sqrt(2). The fractions are 1/0, 0/1, 1/1, 2/1, 3/2, 4/3, 7/5, 10/7, 17/12, .... See A082766(n+2) or A119016 for the numerators. "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 2's, it will always take exactly two terms here to switch from a number that's bigger than sqrt(2) to one that's less. A097545/A097546 gives the similar sequence for Pi. A119014/A119015 gives the similar sequence for e. - Joshua Zucker, May 09 2006
The principal and intermediate convergents to 2^(1/2) begin with 1/1, 3/2 4/3, 7/5, 10/7; essentially, numerators=A143607, denominators=A002965. - Clark Kimberling, Aug 27 2008
(a(2n)*a(2n+1))^2 is a triangular square. - Hugh Darwen, Feb 23 2012
a(2n) are the interleaved values of m such that 2*m^2+1 and 2*m^2-1 are squares, respectively; a(2n+1) are the interleaved values of their corresponding integer square roots. - Richard R. Forberg, Aug 19 2013
Coefficients of (sqrt(2)+1)^n are a(2n)*sqrt(2)+a(2n+1). - John Molokach, Nov 29 2015
Apart from the first two terms, this is the sequence of denominators of the convergents of the continued fraction expansion sqrt(2) = 1/(1 - 1/(2 + 1/(1 - 1/(2 + 1/(1 - ....))))). - Peter Bala, Feb 02 2017
Limit_{n->infinity} a(2n+1)/a(2n) = sqrt(2); lim_{n->infinity} a(2n)/a(2n-1) = (2+sqrt(2))/2. - Ctibor O. Zizka, Oct 28 2018
REFERENCES
C. Brezinski, History of Continued Fractions and Padé Approximants. Springer-Verlag, Berlin, 1991, p. 24.
Jay Kappraff, Musical Proportions at the Basis of Systems of Architectural Proportion both Ancient and Modern, in Volume I of K. Williams and M.J. Ostwald (eds.), Architecture and Mathematics from Antiquity to the Future, DOI 10.1007/978-3-319-00143-2_27, Springer International Publishing Switzerland 2015. See Eq. 32.7.
Serge Lang, Introduction to Diophantine Approximations, Addison-Wesley, New York, 1966.
N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
Guelena Strehler, Chess Fractal, April 2016, p. 24.
LINKS
Jonathan Chappelon and Jorge Luis Ramírez Alfonsín, The Square Frobenius Number, arXiv:2006.14219 [math.NT], 2020.
H. S. M. Coxeter, The role of intermediate convergents in Tait's explanation for phyllotaxis, J. Algebra 20 (1972), 167-175.
Clark Kimberling, Best lower and upper approximates to irrational numbers, Elemente der Mathematik, 52 (1997) 122-126.
Simon Plouffe, Approximations de séries génératrices et quelques conjectures, Dissertation, Université du Québec à Montréal, 1992; arXiv:0911.4975 [math.NT], 2009.
Simon Plouffe, 1031 Generating Functions, Appendix to Thesis, Montreal, 1992
Dave Rusin, Farey fractions on sci.math [Broken link]
Dave Rusin, Farey fractions on sci.math [Cached copy]
K. Williams, The sacred cult revisited: the pavement of the baptistery of San Giovanni, Florence, Math. Intellig., 16 (No. 2, 1994), 18-24.
FORMULA
a(n) = 2*a(n-2) + a(n-4) if n>3; a(0)=0, a(1)=a(2)=a(3)=1.
a(2*n) = a(2*n-1) + a(2*n-2) and a(2*n+1) = 2*a(2*n) - a(2*n-1).
G.f.: (x+x^2-x^3)/(1-2*x^2-x^4).
a(0)=0, a(1)=1, a(n) = a(n-1) + a(2*[(n-2)/2]). - Franklin T. Adams-Watters, Jan 31 2006
For n > 0, a(2*n) = a(2*n-1) + a(2*n-2) and a(2*n+1) = a(2*n) + a(2*n-2). - Jon Perry, Sep 12 2012
a(n) = (((sqrt(2) - 2)*(-1)^n + 2 + sqrt(2))*(1 + sqrt(2))^(floor(n/2)) - ((2 + sqrt(2))*(-1)^n -2 + sqrt(2))*(1 - sqrt(2))^(floor(n/2)))/8. - Ilya Gutkovskiy, Jul 18 2016
a(n) = a(n-1) + a(n-2-(n mod 2)); a(0)=0, a(1)=1. - Ctibor O. Zizka, Oct 28 2018
EXAMPLE
The convergents are rational numbers given by the recurrence relation p/q -> (p + 2*q)/(p + q). Starting with 1/1, the next three convergents are (1 + 2*1)/(1 + 1) = 3/2, (3 + 2*2)/(3 + 2) = 7/5, and (7 + 2*5)/(7 + 5) = 17/12. The sequence puts the denominator first, so a(2) through a(9) are 1, 1, 2, 3, 5, 7, 12, 17. - Michael B. Porter, Jul 18 2016
MAPLE
A002965 := proc(n) option remember; if n <= 0 then 0; elif n <= 3 then 1; else 2*A002965(n-2)+A002965(n-4); fi; end;
A002965:=-(1+2*z+z**2+z**3)/(-1+2*z**2+z**4); # conjectured by Simon Plouffe in his 1992 dissertation; gives sequence except for two leading terms
MATHEMATICA
LinearRecurrence[{0, 2, 0, 1}, {0, 1, 1, 1}, 42] (* Vladimir Joseph Stephan Orlovsky, Feb 13 2012 *)
With[{c=Convergents[Sqrt[2], 20]}, Join[{0, 1}, Riffle[Denominator[c], Numerator[c]]]] (* Harvey P. Dale, Oct 03 2012 *)
PROG
(PARI) a(n)=if(n<4, n>0, 2*a(n-2)+a(n-4))
(PARI) x='x+O('x^100); concat(0, Vec((x+x^2-x^3)/(1-2*x^2-x^4))) \\ Altug Alkan, Dec 04 2015
(JavaScript)
a=new Array(); a[0]=0; a[1]=1;
for (i=2; i<50; i+=2) {a[i]=a[i-1]+a[i-2]; a[i+1]=a[i]+a[i-2]; }
document.write(a); // Jon Perry, Sep 12 2012
(Haskell)
import Data.List (transpose)
a002965 n = a002965_list !! n
a002965_list = concat $ transpose [a000129_list, a001333_list]
-- Reinhard Zumkeller, Jan 01 2014
(Magma) I:=[0, 1, 1, 1]; [n le 4 select I[n] else 2*Self(n-2)+Self(n-4): n in [1..50]]; // Vincenzo Librandi, Nov 30 2015
(GAP) a:=[0, 1];; for n in [3..45] do a[n]:=a[n-1]+a[n-2-((n-1) mod 2)]; od; a; # Muniru A Asiru, Oct 28 2018
CROSSREFS
Cf. A000129(n) = a(2n), A001333(n) = a(2n+1).
KEYWORD
nonn,easy,nice,frac
AUTHOR
EXTENSIONS
Thanks to Michael Somos for several comments which improved this entry.
STATUS
approved
A119016 Numerators of "Farey fraction" approximations to sqrt(2). +10
8
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; text; 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).
a(2n) are the interleaved values of m such that 2*m^2-2 and 2*m^2+2 are squares, respectively; a(2n+1) are the corresponding integer square roots. - Richard R. Forberg, Aug 19 2013
Apart from the first two terms, this is the sequence of numerators of the convergents of the continued fraction expansion sqrt(2) = 1/(1 - 1/(2 + 1/(1 - 1/(2 + 1/(1 - ....))))). - Peter Bala, Feb 02 2017
LINKS
Dave Rusin, Farey fractions on sci.math [Broken link]
Dave Rusin, Farey fractions on sci.math [Cached copy]
FORMULA
From Joerg Arndt, Feb 14 2012: (Start)
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). (End)
a(n) = 1/4*(1-(-1)^n)*(-2+sqrt(2))*(1+sqrt(2))*((1-sqrt(2))^(1/2*(n-1))-(1+sqrt(2))^(1/2*(n-1)))+1/4*(1+(-1)^n)*((1-sqrt(2))^(n/2)+(1+sqrt(2))^(n/2)). - Gerry Martens, Nov 04 2012
a(2n) = A001333(n). a(2n+1) = A052542(n) for n>0. - R. J. Mathar, Feb 05 2024
EXAMPLE
The fractions are 1/0, 0/1, 1/1, 2/1, 3/2, 4/3, 7/5, 10/7, 17/12, ...
MAPLE
f:= gfun:-rectoproc({a(n+4)=2*a(n+2) +a(n), a(0)=1, a(1)=0, a(2)=1, a(3)=2}, a(n), remember):
map(f, [$0..100]); # Robert Israel, Jun 10 2015
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 (* Jean-François Alcover, May 18 2011 *)
LinearRecurrence[{0, 2, 0, 1}, {1, 0, 1, 2}, 40] (* and *) t = {1, 2}; Do[AppendTo[t, t[[-2]] + t[[-1]]]; AppendTo[t, t[[-3]] + t[[-1]]], {n, 30}]; t (* Vladimir Joseph Stephan Orlovsky, Feb 13 2012 *)
a0 := LinearRecurrence[{2, 1}, {1, 1}, 20]; (* A001333 *)
a1 := LinearRecurrence[{2, 1}, {0, 2}, 20]; (* 2 * A000129 *)
Flatten[MapIndexed[{a0[[#]], a1[[#]]} &, Range[20]]] (* Gerry Martens, Jun 09 2015 *)
PROG
(PARI) x='x+O('x^50); Vec((1 - x^2 + 2*x^3)/(1 - 2*x^2 - x^4)) \\ G. C. Greubel, Oct 20 2017
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. Also very closely related to A001333, A052542 and A000129.
See A082766 for another version.
KEYWORD
easy,frac,nonn
AUTHOR
Joshua Zucker, May 08 2006
STATUS
approved
A097545 Numerators of "Farey fraction" approximations to Pi. +10
7
1, 0, 1, 2, 3, 4, 7, 10, 13, 16, 19, 22, 25, 47, 69, 91, 113, 135, 157, 179, 201, 223, 245, 267, 289, 311, 333, 355, 688, 1043, 1398, 1753, 2108, 2463, 2818, 3173, 3528, 3883, 4238, 4593, 4948, 5303, 5658, 6013, 6368, 6723, 7078, 7433, 7788, 8143, 8498, 8853 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,4
COMMENTS
Given a real number x >= 1 (here x = Pi), start with 1/0 and 0/1 and construct the sequence of fractions f_n = r_n/s_n such that:
f_{n+1} = (r_k + r_n)/(s_k + s_n) where k is the greatest integer < n such that f_k <= x <= f_n. Sequence gives values r_n.
Write a 0 if f_n <= x and a 1 if f_n > x. This gives (for x = Pi) the sequence 1, 0, 0, 0, 1, 1, 1, 1, 0 (7 times), 1 (15 times), 0, 1, ... Ignore the initial string 1, 0, 0, 0, which is always the same. Look at the run lengths of the remaining sequence, which are in this case L_1 = 4, L_2 = 7, L_3 = 15, L_4 = 1, L_5 = 292, etc. (A001203). Christoffel showed that x has the continued fraction representation (L_1 - 1) + 1/(L_2 + 1/(L_3 + 1/(L_4 + ...))).
REFERENCES
C. Brezinski, History of Continued Fractions and Padé Approximants, Springer-Verlag, 1991; pp. 151-152.
E. B. Christoffel, Observatio arithmetica, Ann. Math. Pura Appl., (II) 6 (1875), 148-153.
LINKS
Dave Rusin, Farey fractions on sci.math [Broken link]
Dave Rusin, Farey fractions on sci.math [Cached copy]
EXAMPLE
The fractions are 1/0, 0/1, 1/1, 2/1, 3/1, 4/1, 7/2, 10/3, 13/4, 16/5, 19/6, 22/7, 25/8, 47/15, ...
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, 1, 2}, f[Pi, 48]] // Numerator (* Jean-François Alcover, May 18 2011 *)
CROSSREFS
Cf. A097546.
KEYWORD
nonn,frac,nice,easy,look
AUTHOR
N. J. A. Sloane, Aug 28 2004
EXTENSIONS
More terms from Joshua Zucker, May 08 2006
STATUS
approved
A119014 Numerators of "Farey fraction" approximations to e. +10
6
1, 0, 1, 2, 3, 5, 8, 11, 19, 30, 49, 68, 87, 106, 193, 299, 492, 685, 878, 1071, 1264, 1457, 2721, 4178, 6899, 9620, 12341, 15062, 17783, 20504, 23225, 25946, 49171, 75117, 124288, 173459, 222630, 271801, 320972, 370143, 419314, 468485, 517656, 566827 (list; graph; refs; listen; history; text; 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, 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, ...
LINKS
Dave Rusin, Farey fractions on sci.math [Broken link]
Dave Rusin, Farey fractions on sci.math [Cached copy]
EXAMPLE
The fractions are 1/0, 0/1, 1/1, 2/1, 3/1, 5/2, 8/3, 11/4, 19/7, ...
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, 1 }, f[E, 41]] // Numerator
(* Jean-François Alcover, May 18 2011 *)
CROSSREFS
For another version see A006258.
Cf. A097545, A097546 gives the similar sequence for pi. A119015 gives the denominators for this sequence.
KEYWORD
easy,frac,nonn
AUTHOR
Joshua Zucker, May 08 2006
STATUS
approved
A119015 Denominators of "Farey fraction" approximations to e. +10
6
0, 1, 1, 1, 1, 2, 3, 4, 7, 11, 18, 25, 32, 39, 71, 110, 181, 252, 323, 394, 465, 536, 1001, 1537, 2538, 3539, 4540, 5541, 6542, 7543, 8544, 9545, 18089, 27634, 45723, 63812, 81901, 99990, 118079, 136168, 154257, 172346, 190435, 208524, 398959, 607483 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,6
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, 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, ...
LINKS
Dave Rusin, Farey fractions on sci.math [Broken link]
Dave Rusin, Farey fractions on sci.math [Cached copy]
EXAMPLE
The fractions are 1/0, 0/1, 1/1, 2/1, 3/1, 5/2, 8/3, 11/4, 19/7, ...
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[{0, 1, 1}, f[E, 43] // Denominator]
(* Jean-François Alcover, May 18 2011 *)
CROSSREFS
For another version see A006259.
Cf. A097545, A097546 gives the similar sequence for pi. A119014 gives the numerators for this sequence.
KEYWORD
easy,frac,nonn
AUTHOR
Joshua Zucker, May 08 2006
STATUS
approved
page 1

Search completed in 0.011 seconds

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified August 29 17:19 EDT 2024. Contains 375518 sequences. (Running on oeis4.)