cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A195084 a(2n-1) = 2-n, a(2n) = 2+n.

Original entry on oeis.org

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

Views

Author

Dave Durgin, Sep 08 2011

Keywords

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

Crossrefs

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

Extensions

Definition corrected by Omar E. Pol, Sep 11 2011
a(0)=2 prepended by Ruud H.G. van Tol, Sep 21 2024