%I #19 Mar 27 2019 09:59:29
%S 1,7,21,35,-7,-273,-1043,-2261,-1743,8855,47621,128499,180649,-176897,
%T -1972131,-6650245,-12796063,-4632537,71042293,316596931,769091673,
%U 860188175,-1942889011,-13792873269,-41571269999,-69734967113,12059021541,536380855955,2061110273033,4489775100447
%N Expansion of (1 + 3*x)/(1 - 4*x + 7*x^2).
%C Satisfies of recurrence relations system a(n) = 3*a(n-1) + 2*b(n-1), b(n) = b(n-1) - 2*a(n-1), a(0)=1, b(0)=2.
%C More generally, for the recurrence relations system a(n) = 3*a(n-1) + 2*b(n-1), b(n) = b(n-1) - 2*a(n-1), a(0)=k, b(0)=m solution is a(n) = ((2 + i*sqrt(3))^n*((sqrt(3) - i)*k - 2*i*m) + (2 - i*sqrt(3))^n*((sqrt(3) + i)*k + 2*i*m))/(2*sqrt(3)), b(n) = ((2 - i*sqrt(3))^n*((sqrt(3) - i)*m - 2*i*k) + (2 + i*sqrt(3))^n*(2*i*k + (sqrt(3) + i)*m))/(2*sqrt(3)), where i is the imaginary unit.
%C Convolution of A169585 and A168175.
%H <a href="/index/Rec#order_02">Index entries for linear recurrences with constant coefficients</a>, signature (4,-7)
%F O.g.f.: (1 + 3*x)/(1 - 4*x + 7*x^2).
%F E.g.f.: (5*sqrt(3)*sin(sqrt(3)*x) + 3*cos(sqrt(3)*x))*exp(2*x)/3.
%F a(n) = 4*a(n-1) - 7*a(n-2).
%F a(n) = ((2 + i*sqrt(3))^n*(-5*i + sqrt(3)) + (2 - i*sqrt(3))^n*(5*i + sqrt(3)))/(2*sqrt(3)), where i is the imaginary unit.
%F a(n) = 7^(n/2)*((5/sqrt(3))*sin(c)+cos(c)) with c = n*arctan(sqrt(3)/2). - _Peter Luschny_, Jul 21 2016
%p a:=series((1+3*x)/(1-4*x+7*x^2),x=0,30): seq(coeff(a,x,n),n=0..29); # _Paolo P. Lava_, Mar 27 2019
%t LinearRecurrence[{4, -7}, {1, 7}, 30]
%o (PARI) Vec((1+3*x)/(1-4*x+7*x^2) + O(x^99)) \\ _Altug Alkan_, Jul 13 2016
%Y Cf. A168175, A169585.
%K sign,easy
%O 0,2
%A _Ilya Gutkovskiy_, Jul 13 2016