%I #56 Jan 28 2024 04:46:48
%S 1,1,3,5,9,13,19,25,33,41,51,61,73,85,99,113,129,145,163,181,201,221,
%T 243,265,289,313,339,365,393,421,451,481,513,545,579,613,649,685,723,
%U 761,801,841,883,925,969,1013,1059,1105,1153,1201,1251,1301,1353,1405
%N a(n) = floor((n^2 - 2*n + 3)/2).
%H Guenther Schrack, <a href="/A099392/b099392.txt">Table of n, a(n) for n = 1..10010</a>
%H <a href="/index/Rec#order_04">Index entries for linear recurrences with constant coefficients</a>, signature (2,0,-2,1).
%F a(n) = ceiling(n^2/2)-n+1. - _Paul Barry_, Jul 16 2006; index shifted by _R. J. Mathar_, Jul 29 2007
%F a(n) = ceiling(A002522(n-1)/2). - _Branko Curgus_, Sep 02 2007
%F From _R. J. Mathar_, Feb 20 2011: (Start)
%F G.f.: x *( -1+x-x^2-x^3 ) / ( (1+x)*(x-1)^3 ).
%F a(n) = 2*a(n-1) - 2*a(n-3) + a(n-4).
%F a(n+1) = (3 + 2*n^2 + (-1)^n)/4. (End)
%F a(n) = A007590(n-1) + 1 for n >= 2. - _Richard R. Forberg_, Aug 01 2013
%F a(n) = A000217(n) - A007494(n-1). - _Bui Quang Tuan_, Mar 27 2015
%F From _Guenther Schrack_, Apr 17 2018: (Start)
%F a(n) = (2*n^2 - 4*n + 5 -(-1)^n)/4.
%F a(n+2) = a(n) + 2*n for n > 0.
%F a(n) = 2*A033683(n-1) - 1 for n > 0.
%F a(n) = A047838(n-1) + 2 for n > 2.
%F a(n) = A074148(n-1) - n + 2 for n > 1.
%F a(n) = A183575(n-3) + 3 for n > 3.
%F a(n) = 2*A290743(n-1) - 3 for n > 0.
%F a(n) = 2*A290743(n-2) + A109613(n-5) for n > 4.
%F a(n) = A074148(n) - A014601(n-1) for n > 0. (End)
%F Sum_{n>=1} 1/a(n) = tanh(Pi/2)*Pi/2 + coth(Pi/sqrt(2))*Pi/(2*sqrt(2)) + 1/2. - _Amiram Eldar_, Sep 16 2022
%F E.g.f.: ((2 - x + x^2)*cosh(x) + (3 - x + x^2)*sinh(x) - 2)/2. - _Stefano Spezia_, Jan 28 2024
%t Array[Floor[(#^2 - 2 # + 3)/2] &, 54] (* or *)
%t Rest@ CoefficientList[Series[x (-1 + x - x^2 - x^3)/((1 + x) (x - 1)^3), {x, 0, 54}], x] (* _Michael De Vlieger_, Apr 21 2018 *)
%o (PARI) a(n)=(n^2+3)\2-n \\ _Charles R Greathouse IV_, Aug 01 2013
%Y Differs from A085913 at n = 61. Apart from leading term, identical to A080827.
%Y Cf. A000217, A001844, A002522, A007494, A007590, A058331 (bisections).
%Y From _Guenther Schrack_, Apr 17 2018: (Start)
%Y First differences: A052928.
%Y Partial sums: A212964(n) + n for n > 0.
%Y Also A058331 and A001844 interleaved. (End)
%Y Cf. A014601, A033683, A047838, A074148, A109613, A183575, A290743.
%K nonn,easy
%O 1,3
%A _Ralf Stephan_ following a suggestion from Luke Pebody, Oct 20 2004