|
|
A276401
|
|
If n mod 3 = 0 then a(n) = 3^(n/3) + 12*n, if n mod 3 = 1 then a(n) = 4*3^((n-4)/3) + 12*n + 51, otherwise a(n) = 2*3^((n-2)/3) + 12*n - 36.
|
|
2
|
|
|
39, 103, 30, 81, 147, 78, 135, 207, 150, 225, 315, 294, 423, 567, 654, 945, 1251, 1662, 2439, 3231, 4614, 6849, 9099, 13398, 20007, 26631, 39678, 59409, 79155, 118446, 177543, 236655, 354678, 531873, 709083, 1063302, 1594791, 2126295, 3189102, 4783473, 6377859
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
3,1
|
|
LINKS
|
|
|
FORMULA
|
a(n) = a(n-1) + 4*a(n-3) - 4*a(n-4) - 3*a(n-6) + 3*a(n-7) for n > 9.
a(n) = 4*a(n-3) - 3*a(n-6) - 72 for n > 8.
G.f.: x^3*(30*x^6 - 223*x^5 + 190*x^4 + 105*x^3 + 73*x^2 - 64*x - 39)/((x - 1)^2*(3*x^3 - 1)*(x^2 + x + 1)). (End)
|
|
MAPLE
|
f:=n-> if n mod 3 = 0 then 3^(n/3)+12*n
elif n mod 3 = 1 then 4*3^((n-4)/3)+12*n+51
else 2*3^((n-2)/3)+12*n-36; fi;
[seq(f(n), n=3..40)];
|
|
MATHEMATICA
|
CoefficientList[Series[(30 x^6 -223 x^5 + 190 x^4 + 105 x^3 + 73 x^2 - 64 x - 39) / ((x-1)^2 (3 x^3-1) (x^2+x+1)), {x, 0, 33}], x] (* Vincenzo Librandi, Sep 12 2016 *)
Table[Which[Mod[n, 3]==0, 3^(n/3)+12n, Mod[n, 3]==1, 4*3^((n-4)/3)+12n+51, True, 2*3^((n-2)/3)+12n-36], {n, 3, 40}] (* Harvey P. Dale, Nov 16 2020 *)
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,easy
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|