OFFSET
1,1
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 1..1000
Index entries for linear recurrences with constant coefficients, signature (2,-1,2,-4,2,-1,2,-1).
FORMULA
G.f.: x*(2*x^2+x+3)*(5*x^4+19*x^3+16*x^2+7*x+1)/((x^2+x+1)^2*(x-1)^4). - Alois P. Heinz, Mar 11 2014
a(n) = 2*a(n-1) - a(n-2) + 2*a(n-3) - 4*a(n-4) + 2*a(n-5) - a(n-6) + 2*a(n-7) - a(n-8). - Wesley Ivan Hurt, Jun 22 2024
EXAMPLE
For a(n) add the numbers in the first 3 columns.
13 + 1 + 1 + 1
12 + 2 + 1 + 1
11 + 3 + 1 + 1
10 + 4 + 1 + 1
9 + 5 + 1 + 1
8 + 6 + 1 + 1
7 + 7 + 1 + 1
11 + 2 + 2 + 1
10 + 3 + 2 + 1
9 + 1 + 1 + 1 9 + 4 + 2 + 1
8 + 2 + 1 + 1 8 + 5 + 2 + 1
7 + 3 + 1 + 1 7 + 6 + 2 + 1
6 + 4 + 1 + 1 9 + 3 + 3 + 1
5 + 5 + 1 + 1 8 + 4 + 3 + 1
7 + 2 + 2 + 1 7 + 5 + 3 + 1
5 + 1 + 1 + 1 6 + 3 + 2 + 1 6 + 6 + 3 + 1
4 + 2 + 1 + 1 5 + 4 + 2 + 1 7 + 4 + 4 + 1
3 + 3 + 1 + 1 5 + 3 + 3 + 1 6 + 5 + 4 + 1
1 + 1 + 1 + 1 3 + 2 + 2 + 1 4 + 4 + 3 + 1 5 + 5 + 5 + 1
4(1) 4(2) 4(3) 4(4) .. 4n
------------------------------------------------------------------------
3 28 110 285 .. a(n)
MATHEMATICA
b[n_] := (4 n - 1) Sum[((4 n - 2 - i)*Floor[(4 n - 2 - i)/2] - i (4 n - 2 - i) + (i + 2) (Floor[(4 n - 2 - i)/2] - i)) (Floor[(Sign[(Floor[(4 n - 2 - i)/2] - i)] + 2)/2]), {i, 0, 2 n}]/(4 n); Table[b[n], {n, 50}]
CoefficientList[Series[(2 x^2 + x + 3) (5 x^4 + 19 x^3 + 16 x^2 + 7 x + 1)/((x^2 + x + 1)^2 (x - 1)^4), {x, 0, 50}], x] (* Vincenzo Librandi, Mar 13 2014 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Wesley Ivan Hurt, Mar 09 2014
STATUS
approved