OFFSET
0,3
COMMENTS
The ratio a(n+1)/a(n) converges to 6 as n approaches infinity. - Felix P. Muga II, Mar 10 2014
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 0..1000
F. P. Muga II, Extending the Golden Ratio and the Binet-de Moivre Formula, March 2014; Preprint on ResearchGate.
Index entries for linear recurrences with constant coefficients, signature (3,18).
FORMULA
G.f.: x/((1+3*x)*(1-6*x)).
a(n) = (6^n - (-3)^n)/9.
a(n+1) = 6*a(n) + (-3)^n. - Paul Curtz, Jun 07 2011
a(n) = 3^(n-1)*A001045(n). - R. J. Mathar, Mar 08 2021
MATHEMATICA
a[n_]:=(6^n - (-3)^n)/9; Array[a, 22, 0] (* Robert G. Wilson v, Aug 13 2011 *)
LinearRecurrence[{3, 18}, {0, 1}, 31] (* G. C. Greubel, Dec 22 2023 *)
PROG
(PARI) a(n)=(6^n-(-3)^n)/9 \\ Charles R Greathouse IV, Jun 10 2011
(Magma) [(6^n-(-3)^n)/9: n in [0..30]]; // Vincenzo Librandi, Aug 13 2011
(SageMath) [3^(n-1)*lucas_number1(n, 1, -2) for n in range(31)] # G. C. Greubel, Dec 22 2023
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Paul Barry, Feb 24 2003
STATUS
approved