OFFSET
1,2
LINKS
Harvey P. Dale, Table of n, a(n) for n = 1..1000
Index entries for linear recurrences with constant coefficients, signature (3,-2).
FORMULA
a(n) = A060013(n+2), n > 3. - R. J. Mathar, Feb 05 2010
a(n+4) = 3*(2^(n+2) + 1), n >= 0. - Brad Clardy, Apr 03 2013
From Colin Barker, Sep 15 2013: (Start)
a(n) = 3*(4 + 2^n)/4 for n>3.
a(n) = 3*a(n-1) - 2*a(n-2).
G.f.: x*(1-2*x^2)*(1+2*x^2) / ((1-x)*(1-2*x)). (End)
E.g.f.: (3/4)*(4*exp(x) + exp(2*x)) - (15/4) - 7*x/2 - 3*x^2/2 - x^3/3. - G. C. Greubel, Oct 25 2022
MATHEMATICA
LinearRecurrence[{3, -2}, {1, 3, 7, 15, 27}, 40] (* Harvey P. Dale, Nov 30 2020 *)
PROG
(PARI) Vec(-x*(2*x^2-1)*(2*x^2+1)/((x-1)*(2*x-1)) + O(x^100)) \\ Colin Barker, Sep 15 2013
(Magma) [1, 3, 7] cat [3*(1+2^(n-2)): n in [4..40]]; // G. C. Greubel, Oct 25 2022
(SageMath) [1, 3, 7]+[3*(1+2^(n-2)) for n in range(4, 40)] # G. C. Greubel, Oct 25 2022
CROSSREFS
KEYWORD
base,easy,nonn
AUTHOR
Omar E. Pol, Nov 08 2008
EXTENSIONS
Extended by R. J. Mathar, Feb 05 2010
STATUS
approved