%I #21 Sep 08 2022 08:45:49
%S 4,4,10,10,16,16,22,22,28,28,34,34,40,40,46,46,52,52,58,58,64,64,70,
%T 70,76,76,82,82,88,88,94,94,100,100,106,106,112,112,118,118,124,124,
%U 130,130,136,136,142,142,148,148,154,154,160,160,166,166,172,172,178,178
%N a(n) = (6*n - 3*(-1)^n - 1)/2.
%H Vincenzo Librandi, <a href="/A168326/b168326.txt">Table of n, a(n) for n = 1..1000</a>
%H <a href="/index/Rec#order_03">Index entries for linear recurrences with constant coefficients</a>, signature (1,1,-1).
%F a(n) = 6*n - a(n-1) - 4, with n>1, a(1)=4.
%F From _Vincenzo Librandi_, Sep 17 2013: (Start)
%F G.f.: 2*x*(2 + x^2)/((1+x)*(1-x)^2).
%F a(n) = 2*A168236(n) = A168300(n) - 1 = A168329(n) + 1 = A168301(n+1) - 3.
%F a(n) = a(n-1) +a(n-2) -a(n-3). (End)
%F E.g.f.: (1/2)*(-3 + 4*exp(x) + (6*x - 1)*exp(2*x))*exp(-x). - _G. C. Greubel_, Jul 18 2016
%t With[{c = 6 Range[0, 30] + 4}, Riffle[c, c]] (* or *) RecurrenceTable[ {a[1] == 4, a[n] == 6 n - a[n-1] - 4}, a, {n, 60}] (* _Harvey P. Dale_, Jun 12 2012 *)
%t Table[3 n - 3 (-1)^n/2 - 1/2, {n, 70}] (* _Bruno Berselli_, Sep 17 2013 *)
%t CoefficientList[Series[(4 + 2 x^2) / ((1 + x) (1 - x)^2), {x, 0, 70}], x] (* _Vincenzo Librandi_, Sep 17 2013 *)
%o (Magma) [n eq 1 select n+3 else 6*n-Self(n-1)-4: n in [1..70]]; // _Vincenzo Librandi_, Sep 17 2013
%Y Cf. A016957, A168236.
%K nonn,easy,less
%O 1,1
%A _Vincenzo Librandi_, Nov 23 2009
%E New definition by _Bruno Berselli_, Sep 17 2013