login

Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.

A133125
a(n) = (7*3^n - (-3)^n)/6.
3
1, 4, 9, 36, 81, 324, 729, 2916, 6561, 26244, 59049, 236196, 531441, 2125764, 4782969, 19131876, 43046721, 172186884, 387420489, 1549681956, 3486784401, 13947137604, 31381059609, 125524238436, 282429536481, 1129718145924, 2541865828329, 10167463313316
OFFSET
0,2
COMMENTS
A133647 is a companion sequence.
FORMULA
A133080 * A000244, where A000244 = (3^0, 3^1, 3^2, ...).
For even n, a(n) = 3^n. For odd n, a(n) = 4 * 3^(n-1).
From R. J. Mathar, Oct 30 2008: (Start)
G.f.: (1+4*x)/((1+3*x)*(1-3*x)).
a(n) = 9*a(n-2). (End)
a(n) = A038754(n)^2. - T. D. Noe, Jun 10 2011
E.g.f.: (3*exp(3*x) + sinh(3*x))/3. - Andrew Howroyd, Jul 03 2024
EXAMPLE
a(4) = 3^4 = 81.
a(5) = 324 = 4 * 3^4.
MATHEMATICA
Table[3^(n - 2) ((-1)^n + 7)/2, {n, 1, 60}] (* Vladimir Joseph Stephan Orlovsky, Jun 10 2011 *)
LinearRecurrence[{0, 9}, {1, 4}, 30] (* Harvey P. Dale, Mar 27 2017 *)
PROG
(PARI) a(n) = (7*3^n - (-3)^n)/6 \\ Andrew Howroyd, Jul 03 2024
CROSSREFS
Sequence in context: A363408 A115700 A029806 * A126161 A179934 A239213
KEYWORD
nonn
AUTHOR
Gary W. Adamson, Sep 19 2007
EXTENSIONS
Name changed by Andrew Howroyd, Jul 03 2024
STATUS
approved