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.

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

Original entry on oeis.org

6, 6, 14, 14, 22, 22, 30, 30, 38, 38, 46, 46, 54, 54, 62, 62, 70, 70, 78, 78, 86, 86, 94, 94, 102, 102, 110, 110, 118, 118, 126, 126, 134, 134, 142, 142, 150, 150, 158, 158, 166, 166, 174, 174, 182, 182, 190, 190, 198, 198, 206, 206, 214, 214, 222, 222, 230, 230
Offset: 1

Views

Author

Vincenzo Librandi, Nov 24 2009

Keywords

Crossrefs

Cf. A296910.

Programs

  • Magma
    [4*n -2*(-1)^n: n in [1..70]]; // Vincenzo Librandi, Sep 18 2013
    
  • Magma
    [6+8*Floor((n-1)/2): n in [1..70]]; // Vincenzo Librandi, Sep 18 2013
  • Mathematica
    CoefficientList[Series[(6 + 2 x^2)/((1 + x) (x - 1)^2), {x, 0, 70}], x] (* Vincenzo Librandi, Sep 18 2013 *)
    LinearRecurrence[{1,1,-1},{6,6,14},70] (* Harvey P. Dale, Mar 14 2023 *)

Formula

a(n) = 8*n - a(n-1) - 4, with n>1, a(1)=6.
From Vincenzo Librandi, Sep 18 2013: (Start)
G.f.: 2*x*(3 + x^2)/((1+x)*(x-1)^2).
a(n) = a(n-1) + a(n-2) - a(n-3).
a(n) = 6 + 8*floor((n-1)/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