# Greetings from The On-Line Encyclopedia of Integer Sequences! http://oeis.org/ Search: id:a322171 Showing 1-1 of 1 %I A322171 #29 Oct 21 2023 11:50:17 %S A322171 3,11,17,19,23,31,37,39,43,51,57,59,63,71,77,79,83,91,97,99,103,111, %T A322171 117,119,123,131,137,139,143,151,157,159,163,171,177,179,183,191,197, %U A322171 199,203,211,217,219,223,231,237,239,243,251,257,259,263,271,277,279,283,291,297,299 %N A322171 Expansion of x*(3 + 5*x + x^2 + x^3)/((1 - x)^2*(1 + x^2)). %H A322171 Index entries for linear recurrences with constant coefficients, signature (2,-2,2,-1). %F A322171 a(n) = (1/2)*(10*n - (1+2*i)*(-i)^n - (1-2*i)*i^n), where i = sqrt(-1). %F A322171 a(n) = 5*n - 2*sin(Pi*n/2) - cos(Pi*n/2). %F A322171 a(n) = 5*n - A228826(n-1). - _Andrew Howroyd_, Nov 29 2018 %F A322171 G.f.: x*(x^3 + x^2 + 5*x + 3) / ((x - 1)^2 *(x^2 + 1)). - _Vincenzo Librandi_, Dec 06 2018 %p A322171 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 %t A322171 CoefficientList[Series[(x^3 + x^2 + 5 x + 3)/((x - 1)^2 (x^2 + 1)), {x, 0, 50}], x] (* or *) %t A322171 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 *) %t A322171 LinearRecurrence[{2, -2, 2, -1}, {3, 11, 17, 19}, 60] (* _Vincenzo Librandi_, Dec 06 2018 *) %o A322171 (PARI) Vec((3 + 5*x + x^2 + x^3)/((1 - x)^2*(1 + x^2)) + O(x^60)) \\ _Andrew Howroyd_, Nov 29 2018 %o A322171 (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 %Y A322171 Cf. A228826. %K A322171 nonn,easy %O A322171 1,1 %A A322171 _Mark A. Thomas_, Nov 29 2018 # Content is available under The OEIS End-User License Agreement: http://oeis.org/LICENSE