A105723 a(n) = 3^n - (-1)^n.
0, 4, 8, 28, 80, 244, 728, 2188, 6560, 19684, 59048, 177148, 531440, 1594324, 4782968, 14348908, 43046720, 129140164, 387420488, 1162261468, 3486784400, 10460353204, 31381059608, 94143178828, 282429536480, 847288609444, 2541865828328, 7625597484988
Offset: 0
Links
- Muniru A Asiru, Table of n, a(n) for n = 0..2000
- Dhroova Aiylam, Tanya Khovanova, Weighted Mediants and Fractals, arXiv:1711.01475 [math.NT], 2017. See p. 17.
- Index entries for linear recurrences with constant coefficients, signature (2,3).
Programs
-
GAP
List([0..25],n->3^n-(-1)^n); # Muniru A Asiru, Nov 11 2018
-
Magma
[3^n-(-1)^n: n in [0..30]]; // Vincenzo Librandi, Nov 21 2018
-
Mathematica
LinearRecurrence[{2, 3}, {0, 4}, 30] (* Jean-François Alcover, Nov 11 2018 *) Table[3^n - (-1)^n, {n, 0, 30}] (* Vincenzo Librandi, Nov 21 2018 *)
-
PARI
a(n) = 3^n - (-1)^n; \\ Michel Marcus, Aug 18 2017
-
Sage
[3^n - (-1)^n for n in range(30)] # G. C. Greubel, Nov 21 2018
Formula
E.g.f.: exp(3*x) - exp(-x). - G. C. Greubel, Nov 21 2018
G.f.: 4*x/((1+x)*(1-3*x)). - R. J. Mathar, Mar 08 2021
a(n) = 4*A015518(n). - R. J. Mathar, Mar 08 2021
Extensions
Corrected by T. D. Noe, Dec 11 2006