OFFSET
0,2
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).
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
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 *)
PROG
(PARI) a(n) = 3^n - (-1)^n; \\ Michel Marcus, Aug 18 2017
(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
(Sage) [3^n - (-1)^n for n in range(30)] # G. C. Greubel, Nov 21 2018
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Reinhard Zumkeller, Apr 18 2005
EXTENSIONS
Corrected by T. D. Noe, Dec 11 2006
STATUS
approved