%I #22 Mar 04 2024 01:12:19
%S 13,13,26,26,39,39,52,52,65,65,78,78,91,91,104,104,117,117,130,130,
%T 143,143,156,156,169,169,182,182,195,195,208,208,221,221,234,234,247,
%U 247,260,260,273,273,286,286,299,299,312,312,325,325,338,338,351,351,364,364
%N a(n) = 13*n - a(n-1), (with a(1)=13).
%H Vincenzo Librandi, <a href="/A166545/b166545.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 G.f.: 13*x/((1-x)^2*(1+x)). - _Vincenzo Librandi_, Sep 13 2013
%F E.g.f.: (13/4)*((1 + 2*x)*exp(x) - exp(-x)). - _G. C. Greubel_, May 17 2016
%e a(2) = 13*2 - 13 = 13;
%e a(3) = 13*3 - 13 = 26;
%e a(4) = 13*4 - 26 = 26.
%t Transpose[NestList[{First[#]+1,13(First[#]+1)-Last[#]}&,{1,13},70]] [[2]] (* or *) RecurrenceTable[{a[1]==13,a[n]==13n-a[n-1]},a,{n,70}] (* _Harvey P. Dale_, Jan 31 2012 *)
%t CoefficientList[Series[13 / ((1 - x)^2 (1 + x)), {x, 0, 70}], x] (* _Vincenzo Librandi_, Sep 13 2013 *)
%o (Magma) [(13/4)-(13/4)*(-1)^n+(13/2)*n: n in [1..70]]; // _Vincenzo Librandi_, Sep 13 2013
%K nonn,easy
%O 1,1
%A _Vincenzo Librandi_, Oct 22 2009
%E Corrected by _Harvey P. Dale_, Jan 31 2012