OFFSET
0,2
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 0..500
Index entries for linear recurrences with constant coefficients, signature (5,-6).
FORMULA
a(n) = 3^(n-1) + 2^(n-1) + 0^n/6.
a(n) = A007689(n-1), n > 0. - R. J. Mathar, Sep 12 2008
E.g.f.: (1/6)*(1 + 3*exp(2*x) + 2*exp(3*x)). - G. C. Greubel, Nov 11 2024
MATHEMATICA
a[n_]:=3^n/3 + 2^n/2; Flatten[Join[{1, Array[a, 50]}]] (* or *)
CoefficientList[Series[(1 - 3*x + x^2)/((1-2*x)*(1-3*x)), {x, 0, 50}], x] (* Stefano Spezia, Sep 09 2018 *)
LinearRecurrence[{5, -6}, {1, 2, 5}, 40] (* Harvey P. Dale, Jun 14 2022 *)
PROG
(Magma) [3^n/3+2^n/2+0^n/6: n in [0..40]]; // Vincenzo Librandi, May 29 2011
(SageMath)
def A085281(n): return 2^(n-1) +3^(n-1) +int(n==0)/6
[A085281(n) for n in range(41)] # G. C. Greubel, Nov 11 2024
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Paul Barry, Jun 25 2003
STATUS
approved