cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A035302 a(n+1)=2a(n)-4a(n-1)+4a(n-2).

Original entry on oeis.org

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

Views

Author

Keywords

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).