OFFSET
0,2
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (0,2,0,-1).
FORMULA
a(2n) = A008585(n).
a(2n+1) = A016945(n).
G.f.: 3*x*(1+x+x^2)/((1-x)^2 * (1+x)^2).
a(n) = numerator(3n/2). - Wesley Ivan Hurt, Oct 11 2013
a(n) = 3*n / (1 + ((n+1) mod 2)). - Wesley Ivan Hurt, Feb 25 2014
From G. C. Greubel, Jul 31 2022: (Start)
a(n) = 3*n*(3 - (-1)^n)/4.
E.g.f.: (3*x/2)*( 2*cosh(x) + sinh(x) ). (End)
MAPLE
MATHEMATICA
Table[Numerator[3n/2], {n, 0, 100}] (* Wesley Ivan Hurt, Oct 11 2013 *)
CoefficientList[Series[3*x*(1+x+x^2)/(1-x^2)^2, {x, 0, 70}], x] (* Vincenzo Librandi, Mar 03 2014 *)
LinearRecurrence[{0, 2, 0, -1}, {0, 3, 3, 9}, 70] (* Harvey P. Dale, Jun 20 2021 *)
PROG
(Magma) [Numerator(3*n/2): n in [0..100]]; // Vincenzo Librandi, Mar 03 2014
(SageMath) [3*n*(3-(-1)^n)/4 for n in (0..100)] # G. C. Greubel, Jul 31 2022
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Paul Curtz, Sep 16 2009
EXTENSIONS
Edited and extended by R. J. Mathar, Sep 26 2009
New name from Wesley Ivan Hurt, Oct 13 2013
STATUS
approved