OFFSET
1,2
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 1..200
Index entries for linear recurrences with constant coefficients, signature (0,3).
FORMULA
a(n) = (5 + 2*(-1)^n)*3^((2*n - 5 + (-1)^n)/4).
G.f.: x*(1+7*x)/(1-3*x^2).
E.g.f.: (1/3)*(-7 + 7*cosh(sqrt(3)*x) + sqrt(3)*sinh(sqrt(3)*x)). - G. C. Greubel, Aug 02 2024
MATHEMATICA
LinearRecurrence[{0, 3}, {1, 7}, 50] (* or *) Flatten[NestList[3#&, {1, 7}, 20]] (* Harvey P. Dale, Sep 24 2015 *)
PROG
(Magma) [ n le 2 select 6*n-5 else 3*Self(n-2): n in [1..34] ];
(SageMath)
def A166481(n): return 3^(n/2)*(sqrt(3)*(n%2) + 7*((n+1)%2))/3
[A166481(n) for n in range(1, 41)] # G. C. Greubel, Aug 02 2024
CROSSREFS
KEYWORD
nonn
AUTHOR
Klaus Brockhaus, Oct 14 2009
STATUS
approved