OFFSET
0,1
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 0..200
T. A. Gulliver, Sums of Powers of Integers Divisible by Three, Int. J. Contemp. Math. Sciences, Vol. 7, 2012, no. 38, 1895 - 1901.
Index entries for linear recurrences with constant coefficients, signature (30,-315,1350,-1944).
FORMULA
a(n) = 3^n*(2^n + 3^n + 4^n + 1).
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
MATHEMATICA
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 *)
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 *)
PROG
(Python)
def a(n): return 3**n + 6**n + 9**n + 12**n
print([a(n) for n in range(21)]) # Michael S. Branicky, Apr 30 2021
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
N. J. A. Sloane, Dec 22 2012
STATUS
approved