OFFSET
1,2
COMMENTS
LINKS
Index entries for linear recurrences with constant coefficients, signature (2, 1, -4, 1, 2, 0, -2, -1, 4, -1, -2, 1).
FORMULA
G.f.: x/((1-x)^5*(1+x)^3*(1-x+x^2)*(1+x+x^2)).
54*a(n) = 631/64 +405/16*n +3/32*n^4 +15/8*n^3 +381/32*n^2 -(-1)^n*( 9/32*n^2 +45/16*n +375/64) -A131713(n) -3*A057079(n). - R. J. Mathar, Jun 16 2018
EXAMPLE
A001840 interleaved with zeros is
1, 0, 2, 0, 3, 0, 5, 0, 7, 0, 9, 0, 12, 0, 15, 0, ...
Partial sums thereof are
1, 1, 3, 3, 6, 6, 11, 11, 18, 18, 27, 27, 39, 39, 54, 54, ...
This equals A014125 interleaved with itself.
Partial sums thereof are
1, 2, 5, 8, 14, 20, 31, 42, 60, 78, 105, 132, 171, 210, 264, 318, ...
MATHEMATICA
Drop[Accumulate[Accumulate[Riffle[LinearRecurrence[{2, -1, 1, -2, 1}, {0, 1, 2, 3, 5}, 30], 0]]], 2] (* or *) LinearRecurrence[{2, 1, -4, 1, 2, 0, -2, -1, 4, -1, -2, 1}, {1, 2, 5, 8, 14, 20, 31, 42, 60, 78, 105, 132}, 50] (* Harvey P. Dale, Jun 08 2018 *)
PROG
(PARI) /* first computes u = A001840 interleaved with zeros, then v = partial sums, then w = second partial sums */ {m=50; u=vector(m, n, polcoeff(x/((1-x^2)^3*(1+x^2+x^4))+x*O(x^(n)), n)); v=vector(m); a=u[1]; v[1]=a; for(n=2, m, a+=u[n]; v[n]=a); w=vector(m-1); a=v[1]; w[1]=a; for(n=2, m-1, a+=v[n]; w[n]=a); w} \\ Klaus Brockhaus, Sep 21 2009
CROSSREFS
KEYWORD
nonn
AUTHOR
Alford Arnold, Sep 16 2009
EXTENSIONS
Edited and corrected by R. J. Mathar, Klaus Brockhaus and N. J. A. Sloane, Sep 21 2009 - Sep 25 2009
STATUS
approved