This site is supported by donations to The OEIS Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A153774 a(2*n) = 3*a(2*n-1), a(2*n+1) = 3*a(2*n) - 1, with a(1) = 1. 3

%I

%S 1,3,8,24,71,213,638,1914,5741,17223,51668,155004,465011,1395033,

%T 4185098,12555294,37665881,112997643,338992928,1016978784,3050936351,

%U 9152809053,27458427158,82375281474,247125844421,741377533263,2224132599788,6672397799364,20017193398091

%N a(2*n) = 3*a(2*n-1), a(2*n+1) = 3*a(2*n) - 1, with a(1) = 1.

%C 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

%H G. C. Greubel, <a href="/A153774/b153774.txt">Table of n, a(n) for n = 1..1000</a>

%H <a href="/index/Rec#order_03">Index entries for linear recurrences with constant coefficients</a>, signature (3, 1, -3).

%F From _R. J. Mathar_, Mar 13 2010: (Start)

%F a(n) = (7*3^(n - 1) + 2 + (-1)^n)/8.

%F a(n) = 3*a(n-1) + a(n-2) - 3*a(n-3).

%F G.f.: x*(-1 + 2*x^2)/ ((1-x) * (3*x-1) * (1+x)). (End)

%F E.g.f.: (1/24)*(3*exp(-x) - 16 + 6*exp(x) + 7*exp(3*x)). - _G. C. Greubel_, Aug 27 2016

%e a(2) = 3*1 = 3.

%e a(3) = 3*a(2)-1 = 8.

%e a(4) = 3*a(3) = 24.

%p 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

%t 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 *)

%t 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 *)

%o (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

%o (PARI) a(n)=(3^(n-1)*7)\/8 \\ _Charles R Greathouse IV_, Aug 28 2016

%Y Cf. A153773, A153775.

%K nonn,easy

%O 1,2

%A _Clark Kimberling_, Jan 01 2009

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

Last modified August 25 03:03 EDT 2019. Contains 326318 sequences. (Running on oeis4.)