login
This site is supported by donations to The OEIS Foundation.

 

Logo


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

%I

%S 1,2,6,17,51,152,456,1367,4101,12302,36906,110717,332151,996452,

%T 2989356,8968067,26904201,80712602,242137806,726413417,2179240251,

%U 6537720752,19613162256,58839486767,176518460301,529555380902,1588666142706,4765998428117,14297995284351

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

%H G. C. Greubel, <a href="/A153773/b153773.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_, Oct 05 2009: (Start)

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

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

%F a(n) = (5*3^n + 6 - 3*(-1)^n)/24. (End)

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

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

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

%e a(4) = 3*a(3) - 1 = 17.

%t Table[(5*3^n + 6 - 3*(-1)^n)/24 , {n,1,25}] (* or *) LinearRecurrence[{3, 1, -3}, {1, 2, 6}, 25] (* _G. C. Greubel_, Aug 27 2016 *)

%t RecurrenceTable[{a[1] == 1, a[2] == 2, a[3] == 6, 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,2,6]; [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*5)\/24 \\ _Charles R Greathouse IV_, Aug 28 2016

%Y Cf. A153774, 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.

License Agreements, Terms of Use, Privacy Policy. .

Last modified August 25 16:17 EDT 2019. Contains 326324 sequences. (Running on oeis4.)