A080424 a(n) = 3*a(n-1) + 18*a(n-2), a(0)=0, a(1)=1.
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
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).
Programs
-
Magma
[(6^n-(-3)^n)/9: n in [0..30]]; // Vincenzo Librandi, Aug 13 2011
-
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 *)
-
PARI
a(n)=(6^n-(-3)^n)/9 \\ Charles R Greathouse IV, Jun 10 2011
-
SageMath
[3^(n-1)*lucas_number1(n,1,-2) for n in range(31)] # G. C. Greubel, Dec 22 2023
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
Comments