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) = 8*n - a(n-1) - 8, with n>1, a(1)=4.
G.f.: 4*x*(1 + 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
a(n) = 4 * A109613(n-1). - Bruno Berselli, Sep 18 2013
E.g.f.: 4*(1 + (x - 1)*cosh(x) + x*sinh(x)). - G. C. Greubel, Jul 20 2016
MATHEMATICA
Table[4 + 8*Floor[(n - 1)/2], {n, 60}] (* Vincenzo Librandi, Sep 18 2013 *)
LinearRecurrence[{1, 1, -1}, {4, 4, 12}, 60] (* or *) With[{r=NestList[ #+8&, 4, 30]}, Riffle[r, r]] (* Harvey P. Dale, Oct 18 2021 *)
PROG
(Magma) [4+8*Floor((n-1)/2): n in [1..70]]; // Vincenzo Librandi, Sep 18 2013
CROSSREFS
KEYWORD
nonn,easy,less
AUTHOR
Vincenzo Librandi, Nov 25 2009
EXTENSIONS
New definition by Vincenzo Librandi, Sep 18 2013
STATUS
approved