OFFSET
0,4
COMMENTS
Pisano period lengths: 1, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38, 40, ... - R. J. Mathar, Aug 10 2012
Partial sums of A038608. - Stanislav Sykora, Nov 27 2013
LINKS
FORMULA
a(n) = -A001057(n).
a(2n) = n, a(2n+1) = -(n+1).
a(n) = Sum_{k=0..n} k*(-1)^k.
a(n) = -a(n-1) +a(n-2) +a(n-3).
G.f.: -x/( (1-x)*(1+x)^2 ). - R. J. Mathar, Feb 20 2011
a(n) = floor( (n/2)*(-1)^n ). - Wesley Ivan Hurt, Jun 14 2013
a(n) = ceiling( n/2 )*(-1)^n. - Wesley Ivan Hurt, Oct 22 2013
a(n) = ((-1)^n*(2*n+1) - 1)/4. - Adriano Caroli, Mar 28 2015
E.g.f.: (1/4)*(-exp(x) + (1-2*x)*exp(-x) ). - G. C. Greubel, Mar 31 2021
MAPLE
MATHEMATICA
CoefficientList[Series[(x^2-x)/(1-x^2)^2, {x, 0, 64}], x] (* Geoffrey Critzer, Sep 29 2013 *)
LinearRecurrence[{-1, 1, 1}, {0, -1, 1}, 70] (* Harvey P. Dale, Mar 02 2018 *)
PROG
(Magma) [((-1)^n*(2*n+1)-1)/4: n in [0..80]]; // Vincenzo Librandi, Mar 29 2015
(PARI) a(n)=(-1)^n*n\2 \\ Charles R Greathouse IV, Sep 02 2015
(Sage) [((-1)^n*(2*n+1) - 1)/4 for n in (0..70)] # G. C. Greubel, Mar 31 2021
CROSSREFS
Sums of the form Sum_{k=0..n} k^p * q^k: A059841 (p=0,q=-1), this sequence (p=1,q=-1), A089594 (p=2,q=-1), A232599 (p=3,q=-1), A126646 (p=0,q=2), A036799 (p=1,q=2), A036800 (p=2,q=2), A036827 (p=3,q=2), A077925 (p=0,q=-2), A232600 (p=1,q=-2), A232601 (p=2,q=-2), A232602 (p=3,q=-2), A232603 (p=2,q=-1/2), A232604 (p=3,q=-1/2).
KEYWORD
sign,easy
AUTHOR
Clark Kimberling, May 28 2007
STATUS
approved