login
a(n) = 2*n^2 + n - 5.
14

%I #39 Sep 08 2022 08:45:15

%S -5,-2,5,16,31,50,73,100,131,166,205,248,295,346,401,460,523,590,661,

%T 736,815,898,985,1076,1171,1270,1373,1480,1591,1706,1825,1948,2075,

%U 2206,2341,2480,2623,2770,2921,3076,3235,3398,3565,3736,3911,4090,4273

%N a(n) = 2*n^2 + n - 5.

%C a(n) is the result of taking five consecutive numbers starting at n-2, then adding the products of the first and the last and of the second with the fourth and finally adding the middle term. That is, a(n) = (n^2-4) + (n^2-1) + n. - _J. M. Bergot_, Mar 06 2018

%H G. C. Greubel, <a href="/A100040/b100040.txt">Table of n, a(n) for n = 0..5000</a>

%H <a href="/index/Rec#order_03">Index entries for linear recurrences with constant coefficients</a>, signature (3,-3,1).

%F A100035(a(n)) = 4 for n>3;

%F a(n) = A014105(n) - 5 = A084849(n) - 6 = A100041(n) + 2.

%F a(n) = 2*a(n-1)-a(n-2)+4; a(0)=-5, a(1)=-2. - _Vincenzo Librandi_, Dec 26 2010

%F G.f.: (-5 + 13*x - 4*x^2)/(1 - x)^3. - _Arkadiusz Wesolowski_, Dec 25 2011

%F E.g.f.: (2*x^2 + 3*x - 5)*exp(x). - _G. C. Greubel_, Jul 15 2017

%p [seq(2*n^2+n-5,n=0..50)]; # _Muniru A Asiru_, Mar 20 2018

%t Table[2*n^2 + n - 5, {n, 0, 50}] (* _G. C. Greubel_, Jul 15 2017 *)

%t LinearRecurrence[{3,-3,1},{-5,-2,5},50] (* _Harvey P. Dale_, Sep 21 2017 *)

%o (Magma) [ 2*n^2+n-5: n in [0..50] ];

%o (PARI) a(n)=2*n^2+n-5 \\ _Charles R Greathouse IV_, Sep 24 2015

%o (GAP) List([0..50],n->2*n^2+n-5); # _Muniru A Asiru_, Mar 20 2018

%Y Cf. A100036, A100037, A100038, A100039.

%K sign,easy

%O 0,1

%A _Reinhard Zumkeller_, Oct 31 2004