A174029 a(n) = 3*(3*n+1)*(5 - (-1)^n)/4.
3, 18, 21, 45, 39, 72, 57, 99, 75, 126, 93, 153, 111, 180, 129, 207, 147, 234, 165, 261, 183, 288, 201, 315, 219, 342, 237, 369, 255, 396, 273, 423, 291, 450, 309, 477, 327, 504, 345, 531, 363, 558, 381, 585, 399, 612, 417, 639, 435, 666, 453
Offset: 0
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).
Programs
-
Magma
[3*(3*n+1)*(5-(-1)^n)/4: n in [0..50]]; // Vincenzo Librandi, Aug 05 2011
-
Mathematica
LinearRecurrence[{0,2,0,-1},{3,18,21,45},60] (* Harvey P. Dale, Mar 19 2015 *)
-
PARI
vector(50, n, n--; 3*(3*n+1)*(5-(-1)^n)/4) \\ G. C. Greubel, Nov 02 2018
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
Comments