OFFSET
1,2
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 1..1000
Index entries for linear recurrences with constant coefficients, signature (1,1,-1).
FORMULA
a(n) = 8*n - a(n-1) - 6, with n>1, a(1)=1.
a(1)=1, a(2)=9, a(3)=9; for n>3, a(n) = a(n-1) + a(n-2) - a(n-3). - Harvey P. Dale, Jul 28 2012
G.f.: x*(1 + 8*x - x^2)/((1+x)*(x-1)^2). - Vincenzo Librandi, Sep 18 2013
E.g.f.: (2 - exp(x) + (4*x - 1)*exp(2*x))*exp(-x). - G. C. Greubel, Jul 19 2016
MATHEMATICA
RecurrenceTable[{a[1]==1, a[n]==8n-a[n-1]-6}, a, {n, 60}] (* or *) LinearRecurrence[{1, 1, -1}, {1, 9, 9}, 60] (* or *) With[{c=Table[8n+1, {n, 0, 40}]}, Rest[Riffle[c, c]]] (* Harvey P. Dale, Jul 28 2012 *)
Table[1 + 8 Floor[n/2], {n, 60}] (* Bruno Berselli, Sep 18 2013 *)
CoefficientList[Series[(1 + 8 x - x^2)/((1 + x) (x - 1)^2), {x, 0, 70}], x] (* Vincenzo Librandi, Sep 18 2013 *)
PROG
(Magma) [1+8*Floor(n/2): n in [1..70]]; // Vincenzo Librandi, Sep 18 2013
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Vincenzo Librandi, Nov 24 2009
EXTENSIONS
New definition by Vincenzo Librandi, Sep 18 2013
STATUS
approved