login
A080424
a(n) = 3*a(n-1) + 18*a(n-2), a(0)=0, a(1)=1.
6
0, 1, 3, 27, 135, 891, 5103, 31347, 185895, 1121931, 6711903, 40330467, 241805655, 1451365371, 8706597903, 52244370387, 313451873415, 1880754287211, 11284396583103, 67706766919107, 406239439253175, 2437440122303451, 14624630273467503, 87747813021864627, 526486783988008935
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
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