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
1, 2, 6, 17, 51, 152, 456, 1367, 4101, 12302, 36906, 110717, 332151, 996452, 2989356, 8968067, 26904201, 80712602, 242137806, 726413417, 2179240251, 6537720752, 19613162256, 58839486767, 176518460301, 529555380902, 1588666142706, 4765998428117, 14297995284351 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,2

LINKS

G. C. Greubel, Table of n, a(n) for n = 1..1000

Index entries for linear recurrences with constant coefficients, signature (3, 1, -3).

FORMULA

From R. J. Mathar, Oct 05 2009: (Start)

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

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

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

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

EXAMPLE

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

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

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

MATHEMATICA

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

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

PROG

(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

(PARI) a(n) = (3^n*5)\/24 \\ Charles R Greathouse IV, Aug 28 2016

CROSSREFS

Cf. A153774, A153775.

Sequence in context: A148448 A148449 A148450 * A059398 A157002 A071717

Adjacent sequences:  A153770 A153771 A153772 * A153774 A153775 A153776

KEYWORD

nonn,easy

AUTHOR

Clark Kimberling, Jan 01 2009

STATUS

approved

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 July 21 00:49 EDT 2019. Contains 325189 sequences. (Running on oeis4.)