A035302 a(n+1)=2a(n)-4a(n-1)+4a(n-2).
0, 1, -2, -8, -4, 16, 16, -48, -96, 64, 320, 0, -1024, -768, 2560, 4096, -5120, -16384, 4096, 53248, 24576, -147456, -180224, 327680, 786432, -458752, -2752512, -524288, 8126464, 7340032, -19922944, -36700160, 35651584
Offset: 0
Keywords
Links
- Reinhard Zumkeller, Table of n, a(n) for n = 0..1000
- Index entries for linear recurrences with constant coefficients, signature (2, -4, 4).
Crossrefs
Cf. A007420.
Programs
-
Haskell
a035302 n = a035302_list !! (n-1) a035302_list = 0 : 1 : (-2) : zipWith (+) (drop 2 $ map (* 2) a035302_list) (map (* 4) $ zipWith (-) a035302_list $ tail a035302_list) -- Reinhard Zumkeller, Mar 18 2012
-
Mathematica
LinearRecurrence[{2,-4,4},{0,1,-2},40] (* Harvey P. Dale, Dec 01 2024 *)
Formula
G.f.: (x-4*x^2)/(1-2*x+4*x^2-4*x^3).