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.

A138340 Expansion of (1-8x)/(1-4x+16x^2).

Original entry on oeis.org

1, -4, -32, -64, 256, 2048, 4096, -16384, -131072, -262144, 1048576, 8388608, 16777216, -67108864, -536870912, -1073741824, 4294967296, 34359738368, 68719476736, -274877906944, -2199023255552, -4398046511104, 17592186044416
Offset: 0

Views

Author

Paul Barry, Mar 15 2008

Keywords

Comments

abs(a(n)) = 2^A047267(n).

Programs

  • Mathematica
    CoefficientList[Series[(1-8x)/(1-4x+16x^2),{x,0,30}],x] (* or *) LinearRecurrence[{4,-16},{1,-4},30] (* Harvey P. Dale, Sep 30 2014 *)

Formula

a(n) = 2*4^n(cos(Pi*(n+1)/3) - sqrt(3)*sin(Pi*(n+1))/3).
a(n) = 4^n*Sum_{k=0..n} A121314(n,k)*(-1)^k*3^(n-k). - Philippe Deléham, Nov 01 2008
a(n) = A128018(n)*2^n. - Philippe Deléham, Nov 14 2008
a(n) = 4*a(n-1) - 16*a(n-2); a(0)=1, a(1)=-4. - Harvey P. Dale, Sep 30 2014