A002965 Interleave denominators (A000129) and numerators (A001333) of convergents to sqrt(2).
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
Offset: 0
Examples
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
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
- T. D. Noe, Table of n, a(n) for n = 0..500
- Damanvir Singh Binner, Proofs of Chappelon and Alfonsín Conjectures On Square Frobenius Numbers and its Relationship to Simultaneous Pell's Equations, arXiv:2112.15474 [math.NT], 2021.
- 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.
- Pierre Lamothe, En marge du problème des cercles tangents
- 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.
- Index entries for linear recurrences with constant coefficients, signature (0,2,0,1).
Programs
-
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
-
Haskell
import Data.List (transpose) a002965 n = a002965_list !! n a002965_list = concat $ transpose [a000129_list, a001333_list] -- Reinhard Zumkeller, Jan 01 2014
-
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
-
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
-
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 *)
-
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
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
Extensions
Thanks to Michael Somos for several comments which improved this entry.
Comments