%I #16 Mar 26 2023 17:14:06
%S 0,0,2,3,1,1,5,6,2,2,8,9,3,3,11,12,4,4,14,15,5,5,17,18,6,6,20,21,7,7,
%T 23,24,8,8,26,27,9,9,29,30,10,10,32,33,11,11,35,36,12,12,38,39,13,13,
%U 41,42,14,14,44,45,15,15,47,48,16,16,50,51,17,17,53,54,18,18,56,57,19,19,59
%N a(4n) = a(4n+1) = n, a(4n+2) = 3n+2, a(4n+3) = 3n+3.
%H <a href="/index/Rec#order_06">Index entries for linear recurrences with constant coefficients</a>, signature (2,-3,4,-3,2,-1).
%F From _Chai Wah Wu_, Mar 20 2017: (Start)
%F a(n) = 2*a(n-1) - 3*a(n-2) + 4*a(n-3) - 3*a(n-4) + 2*a(n-5) - a(n-6) for n > 5.
%F G.f.: x^2*(x^2 - x + 2)/((x - 1)^2*(x^2 + 1)^2). (End)
%F From _Luce ETIENNE_, Apr 08 2017: (Start)
%F a(n) = (4*n+2+(-1)^((2*n+1-(-1)^n)/4)-(2*n+3)*(-1)^((2*n-1+(-1)^n)/4))/8.
%F a(n) = (2*n+1-(n+1)*cos(n*Pi/2)-(n+2)*sin(n*Pi/2))/4. (End)
%t Table[Switch[Mod[n, 4], 0, n/4, 1, (n - 1)/4, 2, 3 (n - 2)/4 + 2, _, 3 (n - 3)/4 + 3], {n, 0, 78}] (* or *)
%t CoefficientList[Series[x^2*(x^2 - x + 2)/((x - 1)^2*(x^2 + 1)^2), {x, 0, 78}], x] (* _Michael De Vlieger_, Mar 20 2017 *)
%t LinearRecurrence[{2,-3,4,-3,2,-1},{0,0,2,3,1,1},100] (* _Harvey P. Dale_, Mar 26 2023 *)
%K nonn
%O 0,3
%A _Paul Curtz_, Sep 19 2007