Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).
%I #28 Apr 30 2021 10:56:40
%S 4,30,270,2700,28674,315900,3564810,40896900,474714594,5557298220,
%T 65464673850,774752404500,9200707298514,109548133495740,
%U 1306873625950890,15613382906014500,186740100236842434,2235305215228688460,26773529476526331930,320831460449198190900,3845921314068458898354
%N a(n) = 3^n + 6^n + 9^n + 12^n.
%H Vincenzo Librandi, <a href="/A220442/b220442.txt">Table of n, a(n) for n = 0..200</a>
%H T. A. Gulliver, <a href="http://www.m-hikari.com/ijcms/ijcms-2012/37-40-2012/gulliverIJCMS37-40-2012.pdf">Sums of Powers of Integers Divisible by Three</a>, Int. J. Contemp. Math. Sciences, Vol. 7, 2012, no. 38, 1895 - 1901.
%H <a href="/index/Rec#order_04">Index entries for linear recurrences with constant coefficients</a>, signature (30,-315,1350,-1944).
%F a(n) = 3^n*(2^n + 3^n + 4^n + 1).
%F G.f.: -2*(15*x-2)*(45*x^2-15*x+1) / ((3*x-1)*(6*x-1)*(9*x-1)*(12*x-1)). - _Colin Barker_, Jul 22 2013
%t Total/@Table[(3*Range[4])^n,{n,0,20}] (* or *) LinearRecurrence[ {30,-315,1350,-1944},{4,30,270,2700},30] (* _Harvey P. Dale_, Jul 19 2014 *)
%t CoefficientList[Series[-2 (15 x - 2) (45 x^2 - 15 x + 1)/((3 x - 1) (6 x - 1) (9 x - 1) (12 x - 1)), {x, 0, 30}], x] (* _Vincenzo Librandi_, Jul 22 2014 *)
%o (Python)
%o def a(n): return 3**n + 6**n + 9**n + 12**n
%o print([a(n) for n in range(21)]) # _Michael S. Branicky_, Apr 30 2021
%K nonn,easy
%O 0,1
%A _N. J. A. Sloane_, Dec 22 2012