login
Binomial transform, alternating in sign, of Lucas generalized numbers S(n): S(n) = S(n-1) + S(n-2) + S(n-3), S(0)=3, S(1)=1, S(2)=3.
1

%I #21 Sep 08 2022 08:45:06

%S 3,2,4,2,0,-8,-20,-40,-64,-88,-96,-64,48,288,704,1312,2048,2688,2752,

%T 1408,-2560,-10624,-24064,-43008,-64768,-81408,-76800,-24064,114688,

%U 382976,814080,1398784,2031616,2435072,2072576,81920,-4706304,-13557760

%N Binomial transform, alternating in sign, of Lucas generalized numbers S(n): S(n) = S(n-1) + S(n-2) + S(n-3), S(0)=3, S(1)=1, S(2)=3.

%C a(n) is also the trace of D^n, where D is the 3*3 matrix: first row (0,-1,0), second row (-1,1,-1), third row (-1,0,1).

%D Sloane, N. J. A. and Plouffe, S. The Encyclopedia of Integer Sequences. San Diego, CA: Academic Press, 1995.

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

%H M. Bernstein and N. J. A. Sloane, <a href="http://arXiv.org/abs/math.CO/0205301">Some canonical sequences of integers</a>, Linear Alg. Applications, 226-228 (1995), 57-72; erratum 320 (2000), 210. [Link to arXiv version]

%H M. Bernstein and N. J. A. Sloane, <a href="/A003633/a003633_1.pdf">Some canonical sequences of integers</a>, Linear Alg. Applications, 226-228 (1995), 57-72; erratum 320 (2000), 210. [Link to Lin. Alg. Applic. version together with omitted figures]

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

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

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

%F a(n) = 3*A077940(n) - 4*A077940(n-1). - _R. J. Mathar_, Feb 04 2014

%t h[n_]:= h[n]=2*h[n-1]-2*h[n-3]; h[0]=3; h[1]=2; h[2]=4; Table[h[n], {n, 0, 40}]

%t CoefficientList[Series[(3-4x)/(1-2x+2x^3), {x, 0, 40}], x] (* _Vincenzo Librandi_, Feb 05 2014 *)

%t LinearRecurrence[{2,0,-2},{3,2,4},40] (* _Harvey P. Dale_, May 16 2016 *)

%o (Magma) I:=[3,2,4]; [n le 3 select I[n] else 2*Self(n-1)-2*Self(n-3): n in [1..40]]; // _Vincenzo Librandi_, Feb 05 2014

%o (PARI) my(x='x+O('x^40)); Vec((3-4*x)/(1-2*x+2*x^3)) \\ _G. C. Greubel_, Apr 22 2019

%o (Sage) ((3-4*x)/(1-2*x+2*x^3)).series(x, 40).coefficients(x, sparse=False) # _G. C. Greubel_, Apr 22 2019

%Y Cf. A001644.

%K easy,sign

%O 0,1

%A Mario Catalani (mario.catalani(AT)unito.it), Jul 29 2002