%I #39 Sep 08 2022 08:45:11
%S 1,2,6,9,15,20,28,35,45,54,66,77,91,104,120,135,153,170,190,209,231,
%T 252,276,299,325,350,378,405,435,464,496,527,561,594,630,665,703,740,
%U 780,819,861,902,946,989,1035,1080,1128,1175,1225,1274,1326,1377,1431,1484
%N a(n) = (n^2 + 3*n + 1 + (-1)^n) / 2.
%C Previous name was: Modified triangular numbers.
%C Binomial transform is A084266.
%C Partial sums give A064843. - _N. J. A. Sloane_, Jul 20 2008
%C Starting with "1" = triangle A171608 * the odd integers, (1, 3, 5, ...). - _Gary W. Adamson_, Dec 12 2009
%H Vincenzo Librandi, <a href="/A084265/b084265.txt">Table of n, a(n) for n = 0..1000</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) = A000217(n)+A059841(n)+n.
%F E.g.f.: cosh(x) + exp(x)*(2x+x^2/2).
%F a(n) = (n^2+3*n+1)/2+(-1)^n/2.
%F G.f.: ( -1-2*x^2+x^3 ) / ( (1+x)*(x-1)^3 ). - _R. J. Mathar_, Nov 26 2012
%F From _Wesley Ivan Hurt_, Mar 21 2015: (Start)
%F a(n) = 2*a(n-1)-2*a(n-3)+a(n-4).
%F a(n) = Sum_{i=0..n+1} i-(-1)^i. (End)
%F a(2*n) = A000384(n+1); a(2*n-1) = A014105(n)-1; a(2*n-1) = A014107(n+1), for all integers n. - _Hartmut F. W. Hoft_, Feb 02 2022
%p A084265:=n->(n^2+3*n+1)/2+(-1)^n/2: seq(A084265(n),n=0..100); # _Wesley Ivan Hurt_, Mar 21 2015
%t CoefficientList[Series[(-1 - 2 x^2 + x^3) / ((1 + x) (x - 1)^3), {x, 0, 60}], x] (* _Vincenzo Librandi_, Aug 15 2013 *)
%o (Magma) [(n^2+3*n+1)/2+(-1)^n/2: n in [0..60]]; // _Vincenzo Librandi_, Aug 15 2013
%o (PARI) vector(100,n,(n^2+n-1-(-1)^n)/2) \\ _Derek Orr_, Mar 22 2015
%Y Cf. A084263.
%Y Cf. A171608.
%Y Cf. A000384, A014105, A014107.
%K easy,nonn
%O 0,2
%A _Paul Barry_, May 31 2003
%E New name from _Joerg Arndt_, Aug 15 2013