A164965 Cumulative sums of A010892.
1, 2, 2, 1, 0, 0, 1, 2, 2, 1, 0, 0, 1, 2, 2, 1, 0, 0, 1, 2, 2, 1, 0, 0, 1, 2, 2, 1, 0, 0, 1, 2, 2, 1, 0, 0, 1, 2, 2, 1, 0, 0, 1, 2, 2, 1, 0, 0, 1, 2, 2, 1, 0, 0, 1, 2, 2, 1, 0, 0, 1, 2, 2, 1, 0, 0, 1, 2, 2, 1, 0, 0, 1, 2, 2, 1, 0, 0, 1, 2, 2, 1, 0, 0
Offset: 0
Links
- Index entries for linear recurrences with constant coefficients, signature (2,-2,1).
Programs
-
Mathematica
Table[-Floor[1/6 (-4 + n)] - Floor[1/6 (-3 + n)] + Floor[1/6 (-1 + n)] + Floor[n/6], {n, 0, 100}] (* John M. Campbell, Dec 23 2016 *) LinearRecurrence[{2,-2,1},{1,2,2},100] (* Harvey P. Dale, Jul 17 2020 *)
Formula
G.f.: 1/((1 - x)*(1 - x + x^2)). - Philippe Deléham, Oct 11 2011
a(n) = a(n-1) - a(n-2) + 1. - Arkadiusz Wesolowski, Jun 08 2013
a(n) = -floor((n - 4)/6) - floor((n - 3)/6) + floor((n - 1)/6) + floor(n/6). - John M. Campbell, Dec 23 2016
E.g.f.: cosh(x) + 2*exp(x/2)*sin(sqrt(3)*x/2)/sqrt(3) + sinh(x). - Stefano Spezia, Feb 20 2023
Extensions
Offset corrected by John M. Campbell, Dec 23 2016