%I #37 Oct 22 2024 14:37:44
%S 2,7,13,20,28,37,47,58,70,83,97,112,128,145,163,182,202,223,245,268,
%T 292,317,343,370,398,427,457,488,520,553,587,622,658,695,733,772,812,
%U 853,895,938,982,1027,1073,1120,1168,1217,1267,1318,1370,1423,1477,1532
%N a(n) = (n^2 + 9*n + 4)/2.
%H Vincenzo Librandi, <a href="/A155212/b155212.txt">Table of n, a(n) for n = 0..1000</a>
%H <a href="/index/Rec#order_03">Index entries for linear recurrences with constant coefficients</a>, signature (3,-3,1).
%F G.f.: (-2 - x + 2*x^2)/(x - 1)^3. - _R. J. Mathar_, Mar 23 2011
%F a(n) = 3*a(n-1) - 3*a(n-2) + a(n-3). - _Vincenzo Librandi_, Feb 26 2012
%F Sum_{n>=0} 1/a(n) = 271/280 + 2*Pi*tan(sqrt(65)*Pi/2)/sqrt(65). - _Amiram Eldar_, Dec 13 2022
%F E.g.f.: exp(x)*(2 + 5*x + x^2/2). - _Elmo R. Oliveira_, Oct 21 2024
%t Table[(n^2 + 9 n + 4)/2, {n, 0, 200}] (* _Vladimir Joseph Stephan Orlovsky_, Jun 12 2011 *)
%t LinearRecurrence[{3, -3, 1}, {2, 7, 13}, 60] (* _Harvey P. Dale_, Aug 11 2014 *)
%o (Magma) I:=[2,7,13]; [n le 3 select I[n] else 3*Self(n-1)-3*Self(n-2)+1*Self(n-3): n in [1..40]]; // _Vincenzo Librandi_, Feb 26 2012
%o (PARI) for(n=0, 60, print1((n^2+9*n+4)/2", ")); \\ _Vincenzo Librandi_, Feb 26 2012
%Y Cf. A000217.
%K nonn,easy
%O 0,1
%A _Vincenzo Librandi_, Jan 22 2009
%E Edited by _Jon E. Schoenfield_, Jun 23 2010
%E a(0)=2 from _Vincenzo Librandi_, Mar 22 2011