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.

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

Original entry on oeis.org

0, -1, 4, -13, 40, -121, 364, -1093, 3280, -9841, 29524, -88573, 265720, -797161, 2391484, -7174453, 21523360, -64570081, 193710244, -581130733, 1743392200, -5230176601, 15690529804, -47071589413, 141214768240, -423644304721, 1270932914164
Offset: 0

Views

Author

M. F. Hasler, Oct 21 2014

Keywords

Crossrefs

Programs

  • Mathematica
    Table[(-1)^n*(3^n -1)/2, {n, 0, 30}] (* G. C. Greubel, Jun 18 2021 *)
  • PARI
    concat(0, Vec(-x/((x+1)*(3*x+1)) + O(x^100))) \\ Colin Barker, Oct 22 2014
    
  • Sage
    [(-1)^n*(3^n -1)/2 for n in (0..30)] # G. C. Greubel, Jun 18 2021

Formula

Equals A038608 o A003462 = A033999 * A003462, i.e., a(n) = (-1)^n*A003462(n) = (-1)^A003462(n)*A003462(n) = A038608(A003462(n)). - M. F. Hasler, Oct 21 2014
From Colin Barker, Oct 22 2014: (Start)
a(n) = -4*a(n-1) - 3*a(n-2).
G.f.: -x / ((1+x)*(1+3*x)). (End)
E.g.f.: (-1)*exp(-2*x)*sinh(x). - G. C. Greubel, Jun 18 2021

Extensions

Former duplicate of A003462 changed to the signed variant by M. F. Hasler, Oct 21 2014