login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A099784 a(n) = Sum_{k=0..floor(n/3)} C(n-k,2*k) * 2^k * (-2)^(n-3*k). 6

%I #10 Sep 08 2022 08:45:15

%S 1,-2,4,-6,4,16,-92,312,-848,1960,-3824,5760,-3824,-15392,88384,

%T -299616,814144,-1881344,3669568,-5524608,3657472,14807680,-84909824,

%U 287723520,-781639424,1805843968,-3521371136,5298829824

%N a(n) = Sum_{k=0..floor(n/3)} C(n-k,2*k) * 2^k * (-2)^(n-3*k).

%C In general a(n) = Sum_{k=0..floor(n/3)} C(n-k,2*k) * u^k * v^(n-3*k) has g.f. (1-v*x)/((1-v*x)^2 - u*x^2) and satisfies the recurrence a(n) = 2*u*v*a(n-1) - v^2*a(n-2) + u*a(n-3).

%H G. C. Greubel, <a href="/A099784/b099784.txt">Table of n, a(n) for n = 0..1000</a>

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

%F G.f.: (1+2*x)/((1+2*x)^2 - 2*x^3).

%F a(n) = Sum_{k=0..floor(n/3)} C(n-k, 2*k)*2^(n-2*k)*(-1)^(n-3*k).

%F a(n) = -4*a(n-1) - 4*a(n-2) + 2*a(n-3).

%p seq(coeff(series((1-2*x)/((1-2*x)^2 - 2*x^3), x, n+1), x, n), n = 0 .. 30); # _G. C. Greubel_, Sep 04 2019

%t LinearRecurrence[{-4,-4,2}, {1,-2,4}, 30] (* _G. C. Greubel_, Sep 04 2019 *)

%o (PARI) my(x='x+O('x^30)); Vec((1-2*x)/((1-2*x)^2 - 2*x^3)) \\ _G. C. Greubel_, Sep 04 2019

%o (Magma) I:=[1,-2,4]; [n le 3 select I[n] else -4*Self(n-1) - 4*Self(n-2) + 2*Self(n-3): n in [1..30]]; // _G. C. Greubel_, Sep 04 2019

%o (Sage)

%o def A099784_list(prec):

%o P.<x> = PowerSeriesRing(ZZ, prec)

%o return P((1-2*x)/((1-2*x)^2 - 2*x^3)).list()

%o A099784_list(30) # _G. C. Greubel_, Sep 04 2019

%o (GAP) a:=[1,-2,4];; for n in [4..30] do a[n]:=-4*a[n-1]-4*a[n-2] + 2*a[n-3]; od; a; # _G. C. Greubel_, Sep 04 2019

%Y Cf. A099780, A099781, A099782, A099783, A099785, A099786, A099787.

%K easy,sign

%O 0,2

%A _Paul Barry_, Oct 26 2004

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 23 03:30 EDT 2024. Contains 371906 sequences. (Running on oeis4.)