%I #49 Jun 04 2023 17:43:55
%S 0,1,4,9,15,22,31,42,54,67,82,99,117,136,157,180,204,229,256,285,315,
%T 346,379,414,450,487,526,567,609,652,697,744,792,841,892,945,999,1054,
%U 1111,1170,1230,1291,1354,1419,1485,1552,1621,1692,1764,1837,1912,1989,2067,2146
%N a(n) = floor(3*n*(n+1)/4).
%H Bruno Berselli, <a href="/A281026/b281026.txt">Table of n, a(n) for n = 0..1000</a>
%H Bruno Berselli, <a href="/A281026/a281026.jpg">Illustration of the initial terms</a>.
%H <a href="/index/Rec#order_05">Index entries for linear recurrences with constant coefficients</a>, signature (3,-4,4,-3,1).
%F O.g.f.: x*(1 + x + x^2)/((1 + x^2)*(1 - x)^3).
%F E.g.f.: -(1 - 6*x - 3*x^2)*exp(x)/4 - (1 + i)*(i - exp(2*i*x))*exp(-i*x)/8, where i=sqrt(-1).
%F a(n) = a(-n-1) = 3*a(n-1) - 4*a(n-2) + 4*a(n-3) - 3*a(n-4) + a(n-5) = a(n-4) + 6*n - 9.
%F a(n) = 3*n*(n+1)/4 + (i^(n*(n+1)) - 1)/4. Therefore:
%F a(4*k+r) = 12*k^2 + 3*(2*r+1)*k + r^2, where 0 <= r <= 3.
%F a(n) = n^2 - floor((n-1)*(n-2)/4).
%F a(n) = A011865(3*n+2).
%p A281026:=n->floor(3*n*(n+1)/4): seq(A281026(n), n=0..100); # _Wesley Ivan Hurt_, Jan 13 2017
%t Table[Floor[3 n (n + 1)/4], {n, 0, 60}]
%t LinearRecurrence[{3,-4,4,-3,1},{0,1,4,9,15},60] (* _Harvey P. Dale_, Jun 04 2023 *)
%o (PARI) vector(60, n, n--; floor(3*n*(n+1)/4))
%o (Python) [int(3*n*(n+1)/4) for n in range(60)]
%o (Sage) [floor(3*n*(n+1)/4) for n in range(60)]
%o (Maxima) makelist(floor(3*n*(n+1)/4), n, 0, 60);
%o (Magma) [3*n*(n+1) div 4: n in [0..60]];
%Y Subsequence of A214068.
%Y Partial sums of A047273.
%Y Cf. A011865, A045943, A274757 (subsequence).
%Y Cf. sequences with formula floor(k*n*(n+1)/4): A011848 (k=1), A000217 (k=2), this sequence (k=3), A002378 (k=4).
%Y Cf. sequences with formula floor(k*n*(n+1)/(k+1)): A000217 (k=1), A143978 (k=2), this sequence (k=3), A281151 (k=4), A194275 (k=5).
%K nonn,easy
%O 0,3
%A _Bruno Berselli_, Jan 13 2017