OFFSET
0,2
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (1, 1, -1).
FORMULA
a(n) = floor((2*n+1)/4) + 2*floor((2*n+1)/2) + 3*floor(3*(2*n+1)/4).
a(n) = 8*floor((n+1)/2) + 6*floor(n/2).
G.f.: 2 * x * (4 + 3*x) / ((1 - x) * (1 - x^2)). - Michael Somos, Feb 24 2014
a(n) = 2*A047345(n+1) = (14*n - (-1)^n + 1)/2. - Bruno Berselli, Feb 26 2014
E.g.f.: 7*exp(x)*x + sinh(x). - Stefano Spezia, May 15 2021
EXAMPLE
G.f.: 8*x + 14*x^2 + 22*x^3 + 28*x^4 + 36*x^5 + 42*x^6 + 50*x^7 + 56*x^8 + ...
MATHEMATICA
CoefficientList[Series[2 x (4 + 3 x)/((1 - x) (1 - x^2)), {x, 0, 80}], x] (* Vincenzo Librandi, Feb 26 2014 *)
Table[(14 n - (-1)^n + 1)/2, {n, 0, 60}] (* Bruno Berselli, Feb 26 2014 *)
PROG
(PARI) x='x+O('x^50); concat([0], Vec(2*x*(4+3*x)/((1-x)*(1-x^2)))) \\ G. C. Greubel, Aug 07 2018
(Magma) m:=50; R<x>:=PowerSeriesRing(Integers(), m); Coefficients(R!(2*x*(4+3*x)/((1-x)*(1-x^2)))); // G. C. Greubel, Aug 07 2018
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Jose Eduardo Blazek, Feb 22 2014
STATUS
approved