Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.
%I #26 Sep 08 2022 08:44:48
%S 4,29,93,214,410,699,1099,1628,2304,3145,4169,5394,6838,8519,10455,
%T 12664,15164,17973,21109,24590,28434,32659,37283,42324,47800,53729,
%U 60129,67018,74414,82335,90799,99824,109428,119629,130445,141894,153994,166763,180219
%N a(n) is the sum of squares of the first n positive integers congruent to 2 mod 3.
%C Binomial transform of 0, 4, 21, 18, 0, 0, 0, 0, ...
%H Vincenzo Librandi, <a href="/A024394/b024394.txt">Table of n, a(n) for n = 1..1000</a>
%H D. Suprijanto, I. W. Suwarno, <a href="http://dx.doi.org/10.12988/ams.2014.4139">Observation on Sums of Powers of Integers Divisible by 3k-1</a>, Applied Mathematical Sciences, Vol. 8, 2014, no. 45, pp. 2211-2217.
%H <a href="/index/Rec#order_04">Index entries for linear recurrences with constant coefficients</a>, signature (4,-6,4,-1).
%F From _R. J. Mathar_, Oct 08 2011: (Start)
%F a(n) = 3*n^3 + 3*n^2/2 - n/2.
%F G.f.: x*(4 + 13*x + x^2) / (x-1)^4. (End)
%F a(n) = 4*a(n-1) - 6*a(n-2) + 4*a(n-3) - a(n-4). - _Vincenzo Librandi_, Jun 19 2012
%t LinearRecurrence[{4,-6,4,-1},{4,29,93,214},40] (* _Vincenzo Librandi_, Jun 19 2012 *)
%t Accumulate[Range[2,121,3]^2] (* _Harvey P. Dale_, Jun 24 2012 *)
%o (Magma) I:=[4, 29, 93, 214]; [n le 4 select I[n] else 4*Self(n-1)-6*Self(n-2)+4*Self(n-3)-Self(n-4): n in [1..40]]; // _Vincenzo Librandi_, Jun 19 2012
%o (PARI) a(n) = 3*n^3+n*(3*n-1)/2; \\ _Altug Alkan_, Sep 20 2018
%K nonn,easy
%O 1,1
%A _Clark Kimberling_