login
A331115
Numerators of the best approximations for sqrt(2).
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,2
COMMENTS
Every principal convergent, see A002965, and every second intermediate convergent is a best approximation for sqrt(2). The numerators of these convergents are the terms of the current sequence. For denominators and more details, see A331101.
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)
EXAMPLE
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,...
PROG
(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
CROSSREFS
KEYWORD
nonn,frac,easy
AUTHOR
Gerhard Kirchner, Jan 10 2020
STATUS
approved