A137340 a(n) = 2*a(n-1) + 3*a(n-2), with a(0) = 1, a(1) = 9.
1, 9, 21, 69, 201, 609, 1821, 5469, 16401, 49209, 147621, 442869, 1328601, 3985809, 11957421, 35872269, 107616801, 322850409, 968551221, 2905653669, 8716961001, 26150883009, 78452649021, 235357947069, 706073841201, 2118221523609, 6354664570821, 19063993712469
Offset: 0
Links
- Andrew Howroyd, Table of n, a(n) for n = 0..1000
- Index entries for linear recurrences with constant coefficients, signature (2,3).
Programs
-
Mathematica
LinearRecurrence[{2,3},{1,9},30] (* Harvey P. Dale, Jul 31 2023 *)
-
PARI
Vec((1 + 7*x)/((1 + x)*(1 - 3*x)) + O(x^40)) \\ Andrew Howroyd, Feb 02 2020
Formula
G.f.: (1 + 7*x)/((1 + x)*(1 - 3*x)). - Andrew Howroyd, Feb 02 2020
From Klaus Purath, Mar 10 2021: (Start)
a(n) = (5*3^n - 3*(-1)^n)/2.
a(2*n) = (5*9^n - 3)/2.
a(2*n+1) = (15*9^n + 3)/2.
a(n) = 20*3^(n-2) + a(n-2), n > 1.
a(n) = A096019(n) - 2*(-1)^n. (End)
Extensions
Terms a(10) and beyond from Andrew Howroyd, Feb 02 2020