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 A192423 #17 Jul 12 2023 05:50:49 %S A192423 2,0,4,2,16,20,78,140,416,878,2324,5280,13282,31200,76724,182962, %T A192423 445376,1069300,2591118,6239980,15089776,36389278,87917284,212144640, %U A192423 512334722,1236606720,2985883684,7207831202,17402424496,42011258900 %N A192423 Constant term of the reduction by x^2 -> x+2 of the polynomial p(n,x) defined below in Comments. %C A192423 The polynomial p(n,x) is defined by ((x+d)/2)^n + ((x-d)/2)^n, where d = sqrt(x^2+4). For an introduction to reductions of polynomials by substitutions such as x^2 -> x+2, see A192232. %H A192423 G. C. Greubel, <a href="/A192423/b192423.txt">Table of n, a(n) for n = 0..1000</a> %H A192423 <a href="/index/Rec#order_04">Index entries for linear recurrences with constant coefficients</a>, signature (1,4,-1,-1). %F A192423 From _Colin Barker_, May 11 2014: (Start) %F A192423 a(n) = a(n-1) + 4*a(n-2) - a(n-3) - a(n-4). %F A192423 G.f.: 2*(1+x)*(1-2*x) / ((1+x-x^2)*(1-2*x-x^2)). (End) %F A192423 From _G. C. Greubel_, Jul 11 2023: (Start) %F A192423 a(n) = Sum_{j=0..n} T(n, j)*A078008(j), where T(n, k) = [x^k] ((x + sqrt(x^2+4))^n + (x - sqrt(x^2+4))^n)/2^n. %F A192423 a(n) = (2/3)*((-1)^n*A000032(n) + A000129(n+1) - A000129(n)). (End) %e A192423 The first five polynomials p(n,x) and their reductions are as follows: %e A192423 p(0,x) = 2 -> 2 %e A192423 p(1,x) = x -> x %e A192423 p(2,x) = 2 + x^2 -> 4 + x %e A192423 p(3,x) = 3*x + x^3 -> 2 + 6*x %e A192423 p(4,x) = 2 + 4*x^2 + x^4 -> 16 + 9*x. %e A192423 From these, read a(n) = (2, 0, 4, 2, 16, ...) and A192424 = (0, 1, 1, 6, 9, ...). %t A192423 q[x_]:= x+2; d= Sqrt[x^2+4]; %t A192423 p[n_, x_]:= ((x+d)/2)^n + ((x-d)/2)^n (* A161514 *) %t A192423 Table[Expand[p[n, x]], {n, 0, 6}] %t A192423 reductionRules = {x^y_?EvenQ -> q[x]^(y/2), x^y_?OddQ -> x q[x]^((y - 1)/2)}; %t A192423 t= Table[FixedPoint[Expand[#1/. reductionRules] &, p[n,x]], {n,0,30}] %t A192423 Table[Coefficient[Part[t, n], x, 0], {n,30}] (* A192423 *) %t A192423 Table[Coefficient[Part[t, n], x, 1], {n,30}] (* A192424 *) %t A192423 Table[Coefficient[Part[t, n]/2, x, 1], {n,30}] (* A192425 *) %t A192423 LinearRecurrence[{1,4,-1,-1}, {2,0,4,2}, 40] (* _G. C. Greubel_, Jul 11 2023 *) %o A192423 (Magma) R<x>:=PowerSeriesRing(Integers(), 40); Coefficients(R!( 2*(1+x)*(1-2*x)/((1+x-x^2)*(1-2*x-x^2)) )); // _G. C. Greubel_, Jul 11 2023 %o A192423 (SageMath) %o A192423 @CachedFunction %o A192423 def a(n): # a = A192423 %o A192423 if (n<4): return (2,0,4,2)[n] %o A192423 else: return a(n-1) +4*a(n-2) -a(n-3) -a(n-4) %o A192423 [a(n) for n in range(41)] # _G. C. Greubel_, Jul 11 2023 %Y A192423 Cf. A000032, A000129, A078008, A161514, A192232, A192424, A192425. %K A192423 nonn,easy %O A192423 0,1 %A A192423 _Clark Kimberling_, Jun 30 2011