%I #30 Feb 20 2024 11:51:36
%S 2,4,8,13,21,31,44,61,81,106,135,169,209,254,306,364,429,502,582,671,
%T 768,874,990,1115,1251,1397,1554,1723,1903,2096,2301,2519,2751,2996,
%U 3256,3530,3819,4124,4444,4781,5134,5504,5892,6297,6721,7163,7624,8105,8605,9126,9667,10229,10813,11418,12046,12696,13369
%N a(n) = (d(n) - r(n))/5, where d = A026037 and r is the periodic sequence with fundamental period (1,2,0,2,0).
%H Vincenzo Librandi, <a href="/A026039/b026039.txt">Table of n, a(n) for n = 3..10000</a>
%H <a href="/index/Rec#order_08">Index entries for linear recurrences with constant coefficients</a>, signature (3,-3,1,0,1,-3,3,-1).
%F a(n) = (n + 3)*(2*n^2 + 9*n + 22)/30 - 1/5 - (-1/25*((5 - 5^(1/2))^(1/2) - (5 + 5^(1/2))^(1/2))*2^(1/2))*sin(2*n*Pi/5) - (1/25*((5 - 5^(1/2))^(1/2) + (5 + 5^(1/2))^(1/2))*2^(1/2))*sin(4*n*Pi/5). - _Richard Choulet_, Dec 14 2008
%F a(n) = round((2*n-1)*(n^2-n+6)/30) = floor((2*n^3-3*n^2+13*n)/30) = ceiling((n-1)*(2*n^2-n+12)/30) = round((n-1)*(2*n^2-n+12)/30). - _Mircea Merca_, Dec 03 2010
%F From _R. J. Mathar_, May 24 2010: (Start)
%F a(n) = 3*a(n-1) - 3*a(n-2) + a(n-3) + a(n-5) - 3*a(n-6) + 3*a(n-7) - a(n-8).
%F G.f.: -x^3*(-2+2*x-2*x^2+x^3-2*x^4+3*x^5-3*x^6+x^7) / ( (x^4+x^3+x^2+x+1)*(x-1)^4 ). (End)
%F a(n) = a(n-5) + n^2 - 6*n + 13, n > 5, a(1)=0, a(2)=1. - _Mircea Merca_, Dec 03 2010
%t f[n_] := Round[(2 n - 1)*(n^2 - n + 6)/30]; Array[f, 57, 3]
%t LinearRecurrence[{3,-3,1,0,1,-3,3,-1},{2,4,8,13,21,31,44,61},60] (* _Harvey P. Dale_, Sep 05 2023 *)
%o (Magma) [Round((2*n-1)*(n^2-n+6)/30): n in [3..60]]; // _Vincenzo Librandi_, Jun 25 2011
%Y Cf. A026037.
%K nonn
%O 3,1
%A _Clark Kimberling_