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 A126354 #24 Sep 19 2024 04:16:40 %S A126354 1,0,3,2,17,12,99,70,577,408,3363,2378,19601,13860,114243,80782, %T A126354 665857,470832,3880899,2744210,22619537,15994428,131836323,93222358, %U A126354 768398401,543339720,4478554083,3166815962,26102926097,18457556052,152139002499 %N A126354 a(n) = 6*a(n-2) - a(n-4) for n > 4, with a(1)=1, a(2)=0, a(3)=3, a(4)=2. %C A126354 Each pair of terms {odd=x, even=y} gives a solution to the Pell equation x^2 - 2y^2 = 1. Note that odd/even terms also have odd/even indices. The ratio a(2k-1)/a(2k) tends to sqrt(2). Interrelations between odd and even terms: a(2k+1) = 3a(2k-1) + 4a(2k); e.g., 99 = 3*17 + 4*12, 577 = 3*99 + 4*70; a(2k) = 3a(2k-2) + 2a(2k-3), e.g., 70 = 3*12 + 2*17, 408 = 3*70 + 2*99. Odd terms = A001541, even terms = 2*A001109. %H A126354 G. C. Greubel, <a href="/A126354/b126354.txt">Table of n, a(n) for n = 1..1000</a> %H A126354 <a href="/index/Rec#order_04">Index entries for linear recurrences with constant coefficients</a>, signature (0,6,0,-1). %F A126354 O.g.f.: x*(2*x+1)*(-1+x)^2/((x^2-2*x-1)*(x^2+2*x-1)). - _R. J. Mathar_, Dec 10 2007 %t A126354 LinearRecurrence[{0,6,0,-1}, {1,0,3,2}, 35] (* _G. C. Greubel_, Mar 16 2019 *) %o A126354 (PARI) my(x='x+O('x^35)); Vec(x*(1+2*x)*(1-x)^2/((1-2*x-x^2)*(1+2*x-x^2))) \\ _G. C. Greubel_, Mar 16 2019 %o A126354 (Magma) I:=[1, 0, 3, 2]; [n le 4 select I[n] else 6*Self(n-2)-Self(n-4): n in [1..35]]; // _G. C. Greubel_, Mar 16 2019 %o A126354 (Sage) a=(x*(1+2*x)*(1-x)^2/((1-2*x-x^2)*(1+2*x-x^2))).series(x, 35).coefficients(x, sparse=False); a[1:] # _G. C. Greubel_, Mar 16 2019 %o A126354 (GAP) a:=[1, 0, 3, 2];; for n in [5..35] do a[n]:=6*a[n-2]-a[n-4]; od; a; # _G. C. Greubel_, Mar 16 2019 %Y A126354 Cf. A001109, A001541. %K A126354 nonn,easy %O A126354 1,3 %A A126354 _Zak Seidov_, Dec 26 2006