OFFSET
1,1
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) = 10*n - a(n-1) - 4, with n>1, a(1)=8.
a(1)=8, a(2)=8, a(3)=18; for n>3, a(n) = a(n-1) + a(n-2) - a(n-3). - Harvey P. Dale, Aug 02 2013
From R. J. Mathar, Aug 06 2013: (Start)
G.f. 2*x*(4 + x^2) / ( (1+x)*(x-1)^2 ).
a(n) = 2*A168280(n). (End)
a(n) = 8 + 10*floor((n-1)/2). - Vincenzo Librandi, Sep 19 2013
E.g.f.: (1/2)*(-5 + 4*exp(x) + (10*x + 1)*exp(2*x))*exp(-x). - G. C. Greubel, Jul 22 2016
MATHEMATICA
RecurrenceTable[{a[1]==8, a[n]==10n-a[n-1]-4}, a, {n, 60}] (* or *) LinearRecurrence[ {1, 1, -1}, {8, 8, 18}, 60] (* or *) With[{c=NestList[ 10+#&, 8, 30]}, Riffle[c, c]] (* Harvey P. Dale, Aug 02 2013 *)
Table[8 + 10 Floor[(n - 1)/2], {n, 70}] (* or *) CoefficientList[Series[2 (4 + x^2)/((1 + x) (x - 1)^2), {x, 0, 70}], x] (* Vincenzo Librandi, Sep 19 2013 *)
PROG
(Magma) [8+10*Floor((n-1)/2): n in [1..70]]; // Vincenzo Librandi, Sep 19 2013
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Vincenzo Librandi, Nov 26 2009
STATUS
approved