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.

A168589 a(n) = (2 - 3^n)*(-1)^n.

Original entry on oeis.org

1, 1, -7, 25, -79, 241, -727, 2185, -6559, 19681, -59047, 177145, -531439, 1594321, -4782967, 14348905, -43046719, 129140161, -387420487, 1162261465, -3486784399, 10460353201, -31381059607, 94143178825, -282429536479
Offset: 0

Views

Author

Klaus Brockhaus, Nov 30 2009

Keywords

Comments

A signed version of A058481 preceded by 1.

Crossrefs

Cf. A058481 (3^n-2).

Programs

  • Magma
    [ (2-3^n)*(-1)^n: n in [0..25] ];
    
  • Mathematica
    Table[(2 - 3^n)*(-1)^n, {n,0,50}] (* G. C. Greubel, Jul 26 2016 *)
  • PARI
    a(n)=(2-3^n)*(-1)^n \\ Charles R Greathouse IV, Jul 26 2016

Formula

a(n) = -4*a(n-1) - 3*a(n-2) for n > 1; a(0) = 1, a(1) = 1.
G.f.: (1 + 5*x)/((1+x)*(1+3*x)).
E.g.f.: 2*exp(-x) - exp(-3*x). - G. C. Greubel, Jul 26 2016