OFFSET
1,2
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 1..1000
Index entries for linear recurrences with constant coefficients, signature (0,3).
FORMULA
a(n) = 3^((1/4)*(2*n - 1 + (-1)^n)).
G.f.: x*(1 + 3*x)/(1 - 3*x^2).
a(n+3) = a(n+2)*a(n+1)/a(n). - Reinhard Zumkeller, Mar 04 2011
E.g.f.: cosh(sqrt(3)*x) - 1 + sinh(sqrt(3)*x)/sqrt(3). - Stefano Spezia, Dec 31 2022
MATHEMATICA
CoefficientList[Series[(-3*x - 1)/(3*x^2 - 1), {x, 0, 200}], x] (* Vladimir Joseph Stephan Orlovsky, Jun 10 2011 *)
Transpose[NestList[{Last[#], 3*First[#]}&, {1, 3}, 40]][[1]] (* or *) With[{c= 3^Range[20]}, Join[{1}, Riffle[c, c]]](* Harvey P. Dale, Feb 17 2012 *)
PROG
(Magma) [ n le 2 select 2*n-1 else 3*Self(n-2): n in [1..35] ];
(PARI) a(n)=3^(n>>1) \\ Charles R Greathouse IV, Jul 15 2011
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Klaus Brockhaus, Jul 03 2009, Jul 05 2009
EXTENSIONS
G.f. corrected, formula simplified, comments added by Klaus Brockhaus, Sep 18 2009
STATUS
approved