OFFSET
0,1
COMMENTS
All entries are multiples of 3.
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 0..10000
Index entries for linear recurrences with constant coefficients, signature (0,2,0,-1).
FORMULA
a(2n) = 18*n + 3 = 3*A016921(n);
a(2n+1) = 27*n + 18 = A124388(n).
G.f.: ( 3 + 18*x + 15*x^2 + 9*x^3 ) / ( (x-1)^2*(1+x)^2 ). - R. J. Mathar, Jul 02 2011
a(n) = 2*a(n-2) - a(n-4); a(0)=3, a(1)=18, a(2)=21, a(3)=45. - Harvey P. Dale, Mar 19 2015
E.g.f.: (3/4)*(5*(1+3*x)*exp(x) - (1-3*x)*exp(-x)). - G. C. Greubel, Nov 02 2018
MATHEMATICA
LinearRecurrence[{0, 2, 0, -1}, {3, 18, 21, 45}, 60] (* Harvey P. Dale, Mar 19 2015 *)
PROG
(Magma) [3*(3*n+1)*(5-(-1)^n)/4: n in [0..50]]; // Vincenzo Librandi, Aug 05 2011
(PARI) vector(50, n, n--; 3*(3*n+1)*(5-(-1)^n)/4) \\ G. C. Greubel, Nov 02 2018
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Paul Curtz, Mar 06 2010
STATUS
approved