%I #27 Mar 04 2024 01:12:15
%S 2,12,9,19,16,26,23,33,30,40,37,47,44,54,51,61,58,68,65,75,72,82,79,
%T 89,86,96,93,103,100,110,107,117,114,124,121,131,128,138,135,145,142,
%U 152,149,159,156,166,163,173,170,180,177,187,184,194,191,201,198,208,205
%N a(n) = 7*n - a(n-1), with n>1, a(1)=2.
%H Vincenzo Librandi, <a href="/A166544/b166544.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.: -x*(-2-10*x+5*x^2)/((1+x)*(x-1)^2). - _Vincenzo Librandi_, Sep 13 2013
%F From _G. C. Greubel_, May 17 2016: (Start)
%F E.g.f.: (1/4)*(7*(1 + 2*x)*exp(x) + 13*exp(-x) - 20).
%F a(n) = a(n-1) + a(n-2) - a(n-3). (End)
%F Sum_{n>=1} (-1)^(n+1)/a(n) = 1/5 + tan(3*Pi/14)*Pi/7. - _Amiram Eldar_, Feb 23 2023
%t CoefficientList[Series[-(- 2 - 10 x + 5 x^2)/((1 + x) (x - 1)^2), {x, 0, 80}], x] (* _Vincenzo Librandi_, Sep 13 2013 *)
%t LinearRecurrence[{1,1,-1}, {2,12,9}, 50] (* _G. C. Greubel_, May 17 2016 *)
%o (Magma) [n eq 1 select 2 else 7*n-Self(n-1): n in [1..80]]; // _Vincenzo Librandi_, Sep 13 2013
%K nonn,easy
%O 1,1
%A _Vincenzo Librandi_, Oct 16 2009