OFFSET
0,2
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 0..1000
Guo-Niu Han, Enumeration of Standard Puzzles, 2011. [Cached copy]
Guo-Niu Han, Enumeration of Standard Puzzles, arXiv:2006.14070 [math.CO], 2020.
Index entries for linear recurrences with constant coefficients, signature (4,-6,4,-1).
FORMULA
G.f.: (1 + 3*x + 8*x^2 + 21*x^3 + ...) = (1 + 3*x + 5*x^2 + 7*x^3 + 9*x^4 + ...) * (1 + 3*x^2 + 5*x^3 + 7*x^4 + 9*x^5 + ...).
From R. J. Mathar, Aug 13 2010: (Start)
a(n) = 2 + A005900(n), n > 0.
G.f.: -(1 + x)*(x^3 - 4*x^2 + 2*x - 1)/(x - 1)^4. (End)
a(n) = 4*a(n-1) - 6*a(n-2) + 4*a(n-3) - a(n-4). - Vincenzo Librandi, Jul 04 2012
EXAMPLE
a(5) = 46 = (9, 7, 5, 3, 1) dot (1, 0, 3, 5, 7) = 9 + 0 + 15 + 15 + 7.
MATHEMATICA
CoefficientList[Series[-(1+x)*(x^3-4*x^2+2*x-1)/(x-1)^4, {x, 0, 50}], x] (* Vincenzo Librandi, Jul 04 2012 *)
Join[{1}, Table[ListConvolve[Range[1, 2n+1, 2], Join[{1, 0}, Range[3, 2n-1, 2]]], {n, 50}]// Flatten] (* or *) LinearRecurrence[{4, -6, 4, -1}, {1, 3, 8, 21, 46}, 50] (* Harvey P. Dale, Jan 30 2023 *)
PROG
(Magma) I:=[1, 3, 8, 21, 46]; [n le 5 select I[n] else 4*Self(n-1)-6*Self(n-2)+4*Self(n-3)-Self(n-4): n in [1..50]]; // Vincenzo Librandi, Jul 04 2012
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Gary W. Adamson, Jul 31 2010
STATUS
approved