OFFSET
0,4
LINKS
G. C. Greubel, Table of n, a(n) for n = 0..5000
Index entries for linear recurrences with constant coefficients, signature (0,3,0,-3,0,1).
FORMULA
From R. J. Mathar, Feb 09 2010: (Start)
a(2n+1) = n+1 and a(2n) = A000217(n) with a(n) = 3*a(n-2) - 3*a(n-4) + a(n-6).
G.f.: x*(1+x-x^2)/(1-x^2)^3. (End)
a(n) = (n^2+6*n+4+(n^2-2*n-4)*(-1)^n)/16. - Luce ETIENNE, Mar 31 2015
E.g.f.: (x*(x+4)*cosh(x) + (3*x+4)*sinh(x))/8. - G. C. Greubel, Apr 26 2018
MAPLE
a := proc(n) 1 + floor(n/2); binomial(%, n - %) end:
seq(a(n), n = 0..60); # Peter Luschny, Jul 02 2024
MATHEMATICA
Join[{0}, Riffle[Range[30], Range[30] (Range[30] + 1)/2]] (* Bruno Berselli, Jul 15 2013 *)
LinearRecurrence[{0, 3, 0, -3, 0, 1}, {0, 1, 1, 2, 3, 3, 6}, 60] (* Vincenzo Librandi, Apr 02 2015 *)
PROG
(PARI) Vec(x*(1+x-x^2)/(1-x^2)^3 + O(x^80)) \\ Michel Marcus, Apr 01 2015
(Magma) [(n^2+6*n+4+(n^2-2*n-4)*(-1)^n)/16: n in [0..70]]; // Vincenzo Librandi, Apr 02 2015
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Omar E. Pol, May 29 2009
EXTENSIONS
a(0) = 0 prepended and new name by Peter Luschny, Jul 02 2024
STATUS
approved