|
|
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
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
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
|
|
LINKS
|
|
|
FORMULA
|
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
|
|
|
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
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,easy
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|