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 A161938 #21 Aug 15 2025 00:58:30 %S A161938 3,8,26,88,300,1024,3496,11936,40752,139136,475040,1621888,5537472, %T A161938 18906112,64549504,220385792,752444160,2569005056,8771131904, %U A161938 29946517504,102243806208,349082189824,1191841146880,4069200207872,13893118537728,47434073735168 %N A161938 a(n) = ((3+sqrt(2))*(2+sqrt(2))^n + (3-sqrt(2))*(2-sqrt(2))^n)/2. %C A161938 Second binomial transform of A162255. %H A161938 G. C. Greubel, <a href="/A161938/b161938.txt">Table of n, a(n) for n = 0..1000</a> %H A161938 <a href="/index/Rec#order_02">Index entries for linear recurrences with constant coefficients</a>, signature (4,-2). %F A161938 a(n) = 4*a(n-1) - 2*a(n-2) for n>1; a(0) = 3; a(1) = 8. %F A161938 G.f.: (3-4*x)/(1-4*x+2*x^2). %F A161938 From _G. C. Greubel_, Sep 28 2018: (Start) %F A161938 a(2*n) = 2^(n-1) * (Q(2*n +1) + 2*Q(2*n)), Q(m) = Pell-Lucas numbers = A002203(m). %F A161938 a(2*n+1) = 2^(n-1) * (P(2*n+2) + 2*P(2*n+1)), P(m) = Pell numbers = A000129(m). (End) %p A161938 seq(coeff(series((3-4*x)/(1-4*x+2*x^2),x,n+1), x, n), n = 0..25); # _Muniru A Asiru_, Sep 28 2018 %t A161938 CoefficientList[Series[(3-4*x)/(1-4*x+2*x^2), {x,0,50}], x] (* _G. C. Greubel_, Sep 28 2018 *) %o A161938 (Magma) Z<x>:=PolynomialRing(Integers()); N<r>:=NumberField(x^2-2); S:=[ ((3+r)*(2+r)^n+(3-r)*(2-r)^n)/2: n in [0..23] ]; [ Integers()!S[j]: j in [1..#S] ]; // _Klaus Brockhaus_, Jul 01 2009 %o A161938 (Magma) I:=[3,8]; [n le 2 select I[n] else 4*Self(n-1) - 2*Self(n-2): n in [1..30]]; // _G. C. Greubel_, Sep 28 2018 %o A161938 (PARI) my(x='x+O('x^50)); Vec((3-4*x)/(1-4*x+2*x^2)) \\ _G. C. Greubel_, Sep 28 2018 %o A161938 (GAP) a:=[3,8];; for n in [3..25] do a[n]:=4*a[n-1]-2*a[n-2]; od; a; # _Muniru A Asiru_, Sep 28 2018 %Y A161938 Cf. A162255, A135532, A083878. %K A161938 nonn,easy %O A161938 0,1 %A A161938 Al Hakanson (hawkuu(AT)gmail.com), Jun 22 2009, Jun 29 2009 %E A161938 Edited and extended beyond a(5) by _Klaus Brockhaus_, Jul 01 2009