A140096 a(n) = A000045(n) - A113405(n).
0, 1, 1, 1, 1, 1, 1, -1, -7, -23, -59, -139, -311, -677, -1443, -3031, -6295, -12967, -26543, -54073, -109743, -222071, -448323, -903411, -1817767, -3653245, -7335147, -14716663, -29508351, -59138095, -118472607
Offset: 0
Links
- G. C. Greubel, Table of n, a(n) for n = 0..1000
- Index entries for linear recurrences with constant coefficients, signature (3,-1,-3,3,-1,-2).
Programs
-
Mathematica
CoefficientList[Series[-x*(-1 + 2*x + x^2 - 2*x^3 + x^4)/((2*x - 1)*(1 + x)*(x^2 - x + 1)*(x^2 + x - 1)), {x, 0, 50}], x] (* G. C. Greubel, Jul 17 2017 *)
-
PARI
x='x+O('x^50); concat([0], Vec(-x*(-1+2*x+x^2-2*x^3+x^4)/( (2*x-1)*(1+x)*(x^2-x+1)*(x^2+x-1) ))) \\ G. C. Greubel, Jul 17 2017
Formula
a(n)= +3*a(n-1) -a(n-2) -3*a(n-3) +3*a(n-4) -a(n-5) -2*a(n-6).
G.f.: -x*(-1+2*x+x^2-2*x^3+x^4) / ( (2*x-1)*(1+x)*(x^2-x+1)*(x^2+x-1) ).
a(n+1)-2*a(n) = -A141325(n-2), n>2.
Comments