seq(coeff(series(x*(x^3+x^2+5*x+3)/((1-x)^2*(1+x^2)), x, n+1), x, n), n = 1 .. 60); # Muniru A Asiru, Dec 06 2018
proposed
editing
seq(coeff(series(x*(x^3+x^2+5*x+3)/((1-x)^2*(1+x^2)), x, n+1), x, n), n = 1 .. 60); # Muniru A Asiru, Dec 06 2018
proposed
editing
editing
proposed
G.f.: x*(x^3 + x^2 + 5*x + 3) / ((x - 1)^2 *(x^2 + 1)). - Vincenzo Librandi, Dec 06 2018
CoefficientList[Series[(x^3 + x^2 + 5x 5 x + 3)/((x - 1)^2 (x^2 + 1)), {x, 0, 50}], x] (* or *)
a[n_]:= (1/2)* (10* n - (1 + 2 * I)* (-I)^n - (1 - 2* I)* I^n); Simplify[Array[a, 50]] (* Stefano Spezia, Nov 29 2018 *)
LinearRecurrence[{2, -2, 2, -1}, {3, 11, 17, 19}, 60] (* Vincenzo Librandi, Dec 06 2018 *)
(MAGMA) I:=[3, 11, 17, 19]; [n le 4 select I[n] else 2*Self(n-1)-2*Self(n-2)+2*Self(n-3)-Self(n-4): n in [1..60]]; // Vincenzo Librandi, Dec 06 2018
proposed
editing
editing
proposed
Expansion of x*(3 + 5*x + x^2 + x^3)/((1 - x)^2*(1 + x^2)).
a(n) = 5*n - A228826(n-1). - Andrew Howroyd, Nov 29 2018
Cf. A228826.
<a href="/index/Rec#order_04">Index entries for linear recurrences with constant coefficients</a>, signature (2, -2, 2, -1)
nonn,easy,changed
proposed
editing
editing
proposed
Expansion of (x^3 + 5*x + x^2 + 5x +x^3)/((x-1 - x)^2*(1 + x^2+1)).
a(n) = (1/2)*(10*n - (1+2*i)*(-i)^n - (1-2*i)*i^n), where i is the imaginary unity. - Corrected by _Stefano Spezia_, Nov 29 2018
a(n) = 5*n - 2*sin(Pi*n/2) - cos(Pi*n/2).
(PARI) Vec((3 + 5*x + x^2 + x^3)/((1 - x)^2*(1 + x^2)) + O(x^60)) \\ Andrew Howroyd, Nov 29 2018
proposed
editing
editing
proposed
5*x-2*sin(Pi*x/2)-cos(Pi*x/2).
proposed
editing