login
A195084
a(2n-1) = 2-n, a(2n) = 2+n.
1
2, 1, 3, 0, 4, -1, 5, -2, 6, -3, 7, -4, 8, -5, 9, -6, 10, -7, 11, -8, 12, -9, 13, -10, 14, -11, 15, -12, 16, -13, 17, -14, 18, -15, 19, -16, 20, -17, 21, -18, 22, -19, 23, -20, 24, -21, 25, -22, 26, -23, 27, -24, 28, -25, 29, -26, 30, -27, 31, -28, 32, -29, 33
OFFSET
0,1
COMMENTS
Start with a(0)=2, subtract 1, add 2, subtract 3, add 4, subtract 5 and so on.
A permutation of all integers. - Ruud H.G. van Tol, Sep 21 2024
FORMULA
From Bruno Berselli, Sep 12 2011: (Start)
G.f.: (2*x^2+3*x+2)/((1-x)*(1+x)^2).
a(n) = a(-n-1) = -((2*n+1)*a(n-1)-7*n)/(2*n-1) = -a(n-1)+a(n-2)+a(n-3).
a(n) = ((2*n+1)*(-1)^n+7)/4.
a(n) = 2 - A001057(n).
a(n)-a(n-1) = A038608(n); a(n)+a(n-1) = A010702(n-1).
Sum(n=1..n, a(i)) = ((n+1)*(-1)^n+7*n-1)/4, i.e. A016777 and A008586 (>0) alternately. (End)
a(n+2) = a(n) + (-1)^n. - Vincenzo Librandi, Sep 12 2011
E.g.f.: ((4 - x)*cosh(x) + (3 + x)*sinh(x))/2. - Stefano Spezia, Sep 22 2024
CROSSREFS
Sequence in context: A246024 A278529 A160588 * A081171 A334594 A359336
KEYWORD
sign,easy
AUTHOR
Dave Durgin, Sep 08 2011
EXTENSIONS
Definition corrected by Omar E. Pol, Sep 11 2011
a(0)=2 prepended by Ruud H.G. van Tol, Sep 21 2024
STATUS
approved