Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).
%I #27 Mar 04 2023 15:22:38
%S 0,9,4,13,8,17,12,21,16,25,20,29,24,33,28,37,32,41,36,45,40,49,44,53,
%T 48,57,52,61,56,65,60,69,64,73,68,77,72,81,76,85,80,89,84,93,88,97,92,
%U 101,96,105,100,109,104,113,108,117,112,121,116,125,120,129,124,133,128,137
%N a(n) = 4*n - a(n-1) + 1 with n>1, a(1)=0.
%H Vincenzo Librandi, <a href="/A168203/b168203.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) = (4*n + 3 + 7*(-1)^n)/2. - _Jon E. Schoenfield_, Jun 24 2010
%F G.f.: x^2*(9-5*x)/((1+x)*(1-x)^2). - _Vincenzo Librandi_, Feb 28 2012
%F E.g.f.: (1/2)*(7 - 10*exp(x) + (3 + 4*x)*exp(2*x))*exp(-x). - _G. C. Greubel_, Jul 15 2016
%F Sum_{n>=2} (-1)^(n+1)/a(n) = 6/5 - Pi/8 - 3*log(2)/4. - _Amiram Eldar_, Feb 23 2023
%t LinearRecurrence[{1, 1, -1}, {0, 9, 4}, 60] (* _Vincenzo Librandi_, Feb 28 2012 *)
%t nxt[{n_,a_}]:={n+1,4n-a+5}; NestList[nxt,{1,0},70][[;;,2]] (* _Harvey P. Dale_, Mar 04 2023 *)
%o (Magma) I:=[0, 9, 4]; [n le 3 select I[n] else Self(n-1)+Self(n-2)-Self(n-3): n in [1..40]]; // _Vincenzo Librandi_, Feb 28 2012
%K nonn,easy
%O 1,2
%A _Vincenzo Librandi_, Nov 20 2009