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 #40 Sep 08 2022 08:46:01
%S 1,2,8,16,31,55,95,160,266,438,717,1169,1901,3086,5004,8108,13131,
%T 21259,34411,55692,90126,145842,235993,381861,617881,999770,1617680,
%U 2617480,4235191,6852703,11087927,17940664,29028626,46969326,75997989,122967353
%N a(n) = a(n-1) + a(n-2) + n + 3 with n>1, a(0)=1, a(1)=2.
%H Vincenzo Librandi, <a href="/A210729/b210729.txt">Table of n, a(n) for n = 0..200</a>
%H <a href="/index/Rec#order_04">Index entries for linear recurrences with constant coefficients</a>, signature (3,-2,-1,1).
%F G.f.: (1-x+4*x^2-3*x^3)/((1-x-x^2)*(1-x)^2).
%F a(n) = 3*Fibonacci(n+1)+2*Fibonacci(n+3)-n-6. - _Vaclav Kotesovec_, May 13 2012
%F a(n) = 2*Lucas(n+2) + Fibonacci(n+1) - (n+6). - _G. C. Greubel_, Jul 09 2019
%t Table[3*Fibonacci[n+1]+2*Fibonacci[n+3]-n-6,{n,0,40}] (* _Vaclav Kotesovec_, May 13 2012 *)
%o (Python)
%o prpr, prev = 1,2
%o for n in range(2, 99):
%o current = prev+prpr+n+3
%o print(prpr, end=',')
%o prpr = prev
%o prev = current
%o (Magma) [3*Fibonacci(n+1)+2*Fibonacci(n+3)-n-6: n in [0..40]]; // _Vincenzo Librandi_, Jul 18 2013
%o (PARI) vector(40, n, n--; f=fibonacci; 2*f(n+3)+3*f(n+1)-n-6) \\ _G. C. Greubel_, Jul 09 2019
%o (Sage) f=fibonacci; [2*f(n+3)+3*f(n+1)-n-6 for n in (0..40)] # _G. C. Greubel_, Jul 09 2019
%o (GAP) F:=Fibonacci;; List([0..40], n-> 2*F(n+3)+3*F(n+1)-n-6); # _G. C. Greubel_, Jul 09 2019
%Y Cf. A065220: a(n)=a(n-1)+a(n-2)+n-5, a(0)=1,a(1)=2 (except first 2 terms).
%Y Cf. A168043: a(n)=a(n-1)+a(n-2)+n-3, a(0)=1,a(1)=2 (except first 2 terms).
%Y Cf. A131269: a(n)=a(n-1)+a(n-2)+n-2, a(0)=1,a(1)=2.
%Y Cf. A000126: a(n)=a(n-1)+a(n-2)+n-1, a(0)=1,a(1)=2.
%Y Cf. A104161: a(n)=a(n-1)+a(n-2)+n, a(0)=1,a(1)=2 (except the first term).
%Y Cf. A192969: a(n)=a(n-1)+a(n-2)+n+1, a(0)=1,a(1)=2.
%Y Cf. A210728: a(n)=a(n-1)+a(n-2)+n+2, a(0)=1,a(1)=2.
%Y Cf. A000032, A000045.
%K nonn,easy
%O 0,2
%A _Alex Ratushnyak_, May 10 2012