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.

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

Original entry on oeis.org

4, 4, 10, 10, 16, 16, 22, 22, 28, 28, 34, 34, 40, 40, 46, 46, 52, 52, 58, 58, 64, 64, 70, 70, 76, 76, 82, 82, 88, 88, 94, 94, 100, 100, 106, 106, 112, 112, 118, 118, 124, 124, 130, 130, 136, 136, 142, 142, 148, 148, 154, 154, 160, 160, 166, 166, 172, 172, 178, 178
Offset: 1

Views

Author

Vincenzo Librandi, Nov 23 2009

Keywords

Crossrefs

Programs

  • Magma
    [n eq 1 select n+3 else 6*n-Self(n-1)-4: n in [1..70]]; // Vincenzo Librandi, Sep 17 2013
  • Mathematica
    With[{c = 6 Range[0, 30] + 4}, Riffle[c, c]] (* or *) RecurrenceTable[ {a[1] == 4, a[n] == 6 n - a[n-1] - 4}, a, {n, 60}] (* Harvey P. Dale, Jun 12 2012 *)
    Table[3 n - 3 (-1)^n/2 - 1/2, {n, 70}] (* Bruno Berselli, Sep 17 2013 *)
    CoefficientList[Series[(4 + 2 x^2) / ((1 + x) (1 - x)^2), {x, 0, 70}], x] (* Vincenzo Librandi, Sep 17 2013 *)

Formula

a(n) = 6*n - a(n-1) - 4, with n>1, a(1)=4.
From Vincenzo Librandi, Sep 17 2013: (Start)
G.f.: 2*x*(2 + x^2)/((1+x)*(1-x)^2).
a(n) = 2*A168236(n) = A168300(n) - 1 = A168329(n) + 1 = A168301(n+1) - 3.
a(n) = a(n-1) +a(n-2) -a(n-3). (End)
E.g.f.: (1/2)*(-3 + 4*exp(x) + (6*x - 1)*exp(2*x))*exp(-x). - G. C. Greubel, Jul 18 2016

Extensions

New definition by Bruno Berselli, Sep 17 2013