This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A331115 #28 Nov 26 2024 15:37:34 %S A331115 1,3,4,7,17,24,41,99,140,239,577,816,1393,3363,4756,8119,19601,27720, %T A331115 47321,114243,161564,275807,665857,941664,1607521,3880899,5488420, %U A331115 9369319,22619537,31988856,54608393,131836323,186444716,318281039,768398401,1086679440,1855077841,4478554083,6333631924 %N A331115 Numerators of the best approximations for sqrt(2). %C A331115 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. %H A331115 Colin Barker, <a href="/A331115/b331115.txt">Table of n, a(n) for n = 1..1000</a> %H A331115 <a href="/index/Rec#order_06">Index entries for linear recurrences with constant coefficients</a>, signature (0,0,6,0,0,-1). %F A331115 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. %F A331115 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. %F A331115 From _Colin Barker_, Jan 10 2020: (Start) %F A331115 G.f.: x*(1 + x)*(1 + 2*x + 2*x^2 - x^3) / (1 - 6*x^3 + x^6). %F A331115 a(n) = 6*a(n-3) - a(n-6) for n>6. %F A331115 (End) %e A331115 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,... %t A331115 LinearRecurrence[{0,0,6,0,0,-1},{1,3,4,7,17,24},50] (* _Harvey P. Dale_, Nov 26 2024 *) %o A331115 (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 %Y A331115 Cf. A002965, A331101, A001333, A143607, A000129. %K A331115 nonn,frac,easy %O A331115 1,2 %A A331115 _Gerhard Kirchner_, Jan 10 2020