login
A153774
a(2*n) = 3*a(2*n-1), a(2*n+1) = 3*a(2*n) - 1, with a(1) = 1.
3
1, 3, 8, 24, 71, 213, 638, 1914, 5741, 17223, 51668, 155004, 465011, 1395033, 4185098, 12555294, 37665881, 112997643, 338992928, 1016978784, 3050936351, 9152809053, 27458427158, 82375281474, 247125844421, 741377533263, 2224132599788, 6672397799364, 20017193398091
OFFSET
1,2
COMMENTS
Let A be the Hessenberg matrix of order n, defined by: A[1,j] = 1, A[i,i] := 11, (i>1), A[i,i-1] = -1, and A[i,j] = 0 otherwise. Then, for n>=1, a(2n-1)=(-1)^(n-1)*charpoly(A,2). - Milan Janjic, Feb 21 2010
FORMULA
From R. J. Mathar, Mar 13 2010: (Start)
a(n) = (7*3^(n - 1) + 2 + (-1)^n)/8.
a(n) = 3*a(n-1) + a(n-2) - 3*a(n-3).
G.f.: x*(-1 + 2*x^2)/ ((1-x) * (3*x-1) * (1+x)). (End)
E.g.f.: (1/24)*(3*exp(-x) - 16 + 6*exp(x) + 7*exp(3*x)). - G. C. Greubel, Aug 27 2016
EXAMPLE
a(2) = 3*1 = 3.
a(3) = 3*a(2)-1 = 8.
a(4) = 3*a(3) = 24.
MAPLE
A153774 := proc(n) 1/4+(-1)^n/8+7*3^(n-1)/8 ; end proc: seq(A153774(n), n=1..80) ; # R. J. Mathar, Mar 13 2010
MATHEMATICA
LinearRecurrence[{3, 1, -3}, {1, 3, 8}, 30] (* or *) Rest[ CoefficientList[ Series[x (-1+2x^2)/((1-x)(3x-1)(1+x)), {x, 0, 30}], x]] (* Harvey P. Dale, Jun 08 2011 *)
RecurrenceTable[{a[1] == 1, a[2] == 3, a[3] == 8, a[n] == 3 a[n-1] + a[n-2] - 3 a[n-3]}, a, {n, 30}] (* Vincenzo Librandi, Aug 28 2016 *)
PROG
(Magma) I:=[1, 3, 8]; [n le 3 select I[n] else 3*Self(n-1) + Self(n-2) - 3*Self(n-3): n in [1..30]]; // Vincenzo Librandi, Aug 28 2016
(PARI) a(n)=(3^(n-1)*7)\/8 \\ Charles R Greathouse IV, Aug 28 2016
CROSSREFS
Sequence in context: A079121 A027077 A291243 * A052855 A133787 A080923
KEYWORD
nonn,easy
AUTHOR
Clark Kimberling, Jan 01 2009
STATUS
approved