A331115 Numerators of the best approximations for sqrt(2).
1, 3, 4, 7, 17, 24, 41, 99, 140, 239, 577, 816, 1393, 3363, 4756, 8119, 19601, 27720, 47321, 114243, 161564, 275807, 665857, 941664, 1607521, 3880899, 5488420, 9369319, 22619537, 31988856, 54608393, 131836323, 186444716, 318281039, 768398401, 1086679440, 1855077841, 4478554083, 6333631924
Offset: 1
Examples
The principal convergents are 1/1, 3/2, 7/5, 17/12, ... and 1,3,7,17,... the corresponding numerators, see A001333. Intermediate convergents: (2/1), 4/3, (10/7), 24/17, ... (best approximations without brackets). Numerators: 4,24,... (subsequence of A143607). All these numerators sorted: 1,3,4,7,17,24,...
Links
- Colin Barker, Table of n, a(n) for n = 1..1000
- Index entries for linear recurrences with constant coefficients, signature (0,0,6,0,0,-1).
Programs
-
Mathematica
LinearRecurrence[{0,0,6,0,0,-1},{1,3,4,7,17,24},50] (* Harvey P. Dale, Nov 26 2024 *)
-
PARI
Vec(x*(1 + x)*(1 + 2*x + 2*x^2 - x^3) / (1 - 6*x^3 + x^6) + O(x^40)) \\ Colin Barker, Jan 10 2020
Formula
If n mod 3 = 2: a(n) = 3*a(n-1) - a(n-2), otherwise: a(n) = a(n-1) + a(n-2), for n>2 with a(1)=1, a(2)=3.
a(3n-2) = 1/2*S(2n-1), a(3n-1) = 1/2*S(2n), a(3n) = w/2*D(2n), for n>0 with w = sqrt(2) and S(n) = (1+w)^n + (1-w)^n and D(n) = (1+w)^n - (1-w)^n.
From Colin Barker, Jan 10 2020: (Start)
G.f.: x*(1 + x)*(1 + 2*x + 2*x^2 - x^3) / (1 - 6*x^3 + x^6).
a(n) = 6*a(n-3) - a(n-6) for n>6.
(End)
Comments