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.

A168381 a(n) = 4*n + 2*(-1)^n.

Original entry on oeis.org

2, 10, 10, 18, 18, 26, 26, 34, 34, 42, 42, 50, 50, 58, 58, 66, 66, 74, 74, 82, 82, 90, 90, 98, 98, 106, 106, 114, 114, 122, 122, 130, 130, 138, 138, 146, 146, 154, 154, 162, 162, 170, 170, 178, 178, 186, 186, 194, 194, 202, 202, 210, 210, 218, 218, 226, 226, 234, 234
Offset: 1

Views

Author

Vincenzo Librandi, Nov 24 2009

Keywords

Crossrefs

Cf. A163980.

Programs

  • Magma
    [4*n +2*(-1)^n: n in [1..70]]; // Vincenzo Librandi, Sep 18 2013
  • Mathematica
    CoefficientList[Series[(2 + 8 x - 2 x^2)/((1 + x) (x -1)^2), {x, 0, 70}], x] (* Vincenzo Librandi, Sep 18 2013 *)

Formula

a(n) = 8*n - a(n-1) - 4, with n>1, a(1)=2.
G.f.: 2*x*(1 + 4*x - x^2)/((1+x)*(x-1)^2). - Vincenzo Librandi, Sep 18 2013
a(n) = a(n-1) +a(n-2) -a(n-3). - Vincenzo Librandi, Sep 18 2013
From Bruno Berselli, Sep 18 2013: (Start)
a(n) = 2*A163980(n).
a(n) = 2 + 8*floor(n/2). (End)
E.g.f.: 2*(1 - exp(x) + 2*x*exp(2*x))*exp(-x). - G. C. Greubel, Jul 19 2016

Extensions

Definition rewritten by Vincenzo Librandi, Sep 18 2013