login
a(n) = 4^n - 2*3^n.
3

%I #32 Sep 15 2024 20:24:48

%S -1,-2,-2,10,94,538,2638,12010,52414,222778,930478,3840010,15714334,

%T 63920218,258869518,1045044010,4208873854,16921588858,67944635758,

%U 272553384010,1092538058974,4377125804698,17529423925198,70180457820010,280910117637694,1124205329623738,4498515895713838

%N a(n) = 4^n - 2*3^n.

%H Vincenzo Librandi, <a href="/A002250/b002250.txt">Table of n, a(n) for n = 0..1000</a>

%H <a href="/index/Rec#order_02">Index entries for linear recurrences with constant coefficients</a>, signature (7,-12).

%F From _Bruno Berselli_, Jan 25 2011: (Start)

%F G.f.: -(1-5*x)/((1-3*x)*(1-4*x)).

%F a(n) = 7*a(n-1) - 12*a(n-2) for n > 1. (End)

%F From _Elmo R. Oliveira_, Sep 15 2024: (Start)

%F E.g.f.: exp(3*x)*(exp(x) - 2).

%F a(n) = A000302(n) - A008776(n). (End)

%t Table[4^n - 2 3^n, {n, 0, 30}] (* or *) CoefficientList[Series[-(1 - 5 x) / ((1 - 3 x) (1 - 4 x)), {x, 0, 40}], x] (* _Vincenzo Librandi_, Jun 20 2013 *)

%o (Magma) [4^n-2*3^n: n in [0..30]]; // _Vincenzo Librandi_, Jun 20 2013

%o (PARI) a(n)=4^n-2*3^n \\ _Charles R Greathouse IV_, Jun 23 2020

%Y Cf. A000244, A000302, A005061, A008776.

%K sign,easy

%O 0,2

%A _N. J. A. Sloane_