%I #16 May 12 2021 04:16:13
%S 1,5,-3,13,-19,45,-83,173,-339,685,-1363,2733,-5459,10925,-21843,
%T 43693,-87379,174765,-349523,699053,-1398099,2796205,-5592403,
%U 11184813,-22369619,44739245,-89478483,178956973,-357913939,715827885,-1431655763,2863311533,-5726623059
%N a(n) = (7 - 4*(-2)^n)/3.
%C Also generalized k-bonacci sequence a(n)=2*a(n-2)-a(n-1). - Philippe LALLOUET (philip.lallouet(AT)wanadoo.fr), Jun 30 2007
%C The k-bonacci sequences are constructed using the formula a(n+k)=sum({i=1 to k-1) a(n+i) where integers a(0) to a(k-1) are given. The generalized k-bonnacci sequences are built with the formula a(n+k) =sum({i=1 to k-1}p(i)* a(n+i)), where integer coefficients p(1) to p(k-1) and integers a(0) to a(k-1) are given . The terms of such a sequence may be calculated by a formula such as: a(n>=k) = sum ({i =0 to k-1} q(i) * r(i)^n) where r(0) to r(k-1) are the roots (real or complex) of the equation x^k= sum {i=0 to i=k-1}p(i)x^i) The coefficients q(i) (real or complex) may be calculated by the system of equations: {for p=0 to k-1} sum( {(i=0 to k-1} q(i)*r(i)^p)=a(p), first given terms of the sequence For this sequence, the roots of x^2=2*x-1 are 1 and -2 The system of equations for q(0) and q(1) is q(0)+ q(1) = 1 q(0)-2*q(1)= 5 which gives q(0)=7/3 and q(1)= -4/3 and then the first proposed formula. - Philippe LALLOUET (philip.lallouet(AT)wanadoo.fr), Jun 30 2007
%H <a href="/index/Rec">Index entries for linear recurrences with constant coefficients</a>, signature (-1,2).
%F G.f.: (1+6*x)/((1-x)*(1+2*x)).
%F E.g.f.: (7*exp(x)-4*exp(-2*x))/3.
%t (7-4(-2)^Range[0,40])/3 (* or *) LinearRecurrence[{-1,2},{1,5},40] (* _Harvey P. Dale_, Feb 25 2012 *)
%Y Cf. A083595.
%K easy,sign
%O 0,2
%A _Paul Barry_, May 02 2003
|