OFFSET
0,2
COMMENTS
One-half of the antidiagonal sums of array A220508.
LINKS
Index entries for linear recurrences with constant coefficients, signature (2,1,-4,1,2,-1).
FORMULA
a(n) = (n+1)*(1 - (-1)^n)/16 + (7/4)*(binomial(n+3, 3) - binomial(n+2, 2)).
a(n) = (A342362(n) - (n + 1))/4.
a(n) = 2*a(n-1) + a(n-2) - 4*a(n-3) + a(n-4) + 2*a(n-5) - a(n-6) for n > 5. - Chai Wah Wu, Mar 11 2021
MATHEMATICA
CoefficientList[Series[(2x^2+3x+2) x/((x+1)^2 (x-1)^4), {x, 0, 70}], x] (* or *) LinearRecurrence[{2, 1, -4, 1, 2, -1}, {0, 2, 7, 18, 35, 62}, 70] (* Harvey P. Dale, Jul 08 2023 *)
PROG
(PARI) /* First program */
seq1(n)={my(x='x+O('x^n)); Vec((2*x^2 + 3*x + 2)*x/((x + 1)^2*(x - 1)^4), -n)}
/* Second program (array M is A220508) */
seq2(nn) = {my(M=matrix(nn+1, nn+1)); my(a=vector(nn+1)); for(n=1, nn+1, for(k=1, nn+1, M[n, k]=if(k == n, n^2-n, if(k < n, n^2-2*n+k, k^2-n)))); for(n=1, nn+1, a[n] = sum(k=1, n, M[n-k+1, k])/2); a}
CROSSREFS
KEYWORD
nonn
AUTHOR
Petros Hadjicostas, Mar 10 2021
STATUS
approved