A073314 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.
3, 2, 4, 2, 0, -8, -20, -40, -64, -88, -96, -64, 48, 288, 704, 1312, 2048, 2688, 2752, 1408, -2560, -10624, -24064, -43008, -64768, -81408, -76800, -24064, 114688, 382976, 814080, 1398784, 2031616, 2435072, 2072576, 81920, -4706304, -13557760
Offset: 0
References
- Sloane, N. J. A. and Plouffe, S. The Encyclopedia of Integer Sequences. San Diego, CA: Academic Press, 1995.
Links
- Vincenzo Librandi, Table of n, a(n) for n = 0..1000
- M. Bernstein and N. J. A. Sloane, Some canonical sequences of integers, Linear Alg. Applications, 226-228 (1995), 57-72; erratum 320 (2000), 210. [Link to arXiv version]
- M. Bernstein and N. J. A. Sloane, Some canonical sequences of integers, Linear Alg. Applications, 226-228 (1995), 57-72; erratum 320 (2000), 210. [Link to Lin. Alg. Applic. version together with omitted figures]
- Index entries for linear recurrences with constant coefficients, signature (2,0,-2).
Crossrefs
Cf. A001644.
Programs
-
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
-
Mathematica
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}] CoefficientList[Series[(3-4x)/(1-2x+2x^3), {x, 0, 40}], x] (* Vincenzo Librandi, Feb 05 2014 *) LinearRecurrence[{2,0,-2},{3,2,4},40] (* Harvey P. Dale, May 16 2016 *)
-
PARI
my(x='x+O('x^40)); Vec((3-4*x)/(1-2*x+2*x^3)) \\ G. C. Greubel, Apr 22 2019
-
Sage
((3-4*x)/(1-2*x+2*x^3)).series(x, 40).coefficients(x, sparse=False) # G. C. Greubel, Apr 22 2019
Formula
a(n) = 2*a(n-1) - 2*a(n-3), a(0)=3, a(1)=2, a(2)=4.
G.f.: (3-4*x)/(1-2*x+2*x^3).
Comments