login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A131732 a(4*k) = 2*k+1, a(4*k+1) = -4*k-3, a(4*k+2) = 2*k+2, a(4*k+3) = 0. 1
1, -3, 2, 0, 3, -7, 4, 0, 5, -11, 6, 0, 7, -15, 8, 0, 9, -19, 10, 0, 11, -23, 12, 0, 13, -27, 14, 0, 15, -31, 16, 0, 17, -35, 18, 0, 19, -39, 20, 0, 21, -43, 22, 0, 23, -47, 24, 0, 25, -51, 26, 0, 27, -55, 28, 0, 29, -59, 30, 0, 31, -63, 32, 0, 33, -67, 34, 0, 35, -71, 36, 0, 37, -75, 38, 0, 39, -79, 40, 0, 41, -83, 42, 0, 43, -87, 44, 0 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,2
LINKS
FORMULA
a(n) = -(n+2)*((-1)^(n+1)+sin(Pi*n/2))/2. - Todd Silvestri, Dec 16 2014
From Colin Barker, Dec 05 2016: (Start)
a(n) = -2*a(n-1)-3*a(n-2)-4*a(n-3)-3*a(n-4)-2*a(n-5)-a(n-6) for n>5.
G.f.: (1 - x - x^2 - x^3) / ((1 + x)^2*(1 + x^2)^2).
(End)
a(2*n) = n+1 for all n in Z. - Michael Somos, Dec 17 2016
EXAMPLE
G.f. = 1 - 3*x + 2*x^2 + 3*x^4 - 7*x^5 + 4*x^6 + 5*x^8 - 11*x^9 + 6*x^10 + ...
MATHEMATICA
a[n_Integer/; n>=0]:=-(n+2) ((-1)^(n+1)+Mod[n^2 (3 n+2), 4, -1])/2 (* Todd Silvestri, Dec 16 2014 *)
PROG
(PARI) Vec((1 - x - x^2 - x^3) / ((1 + x)^2*(1 + x^2)^2) + O(x^100)) \\ Colin Barker, Dec 05 2016
(PARI) {a(n) = [ n\2 + 1, -2 - n, n\2 + 1, 0][n%4 + 1]}; /* Michael Somos, Dec 17 2016 */
(PARI) {a(n) = if( n%4==3, 0, n%4==1, -2 - n, n/2 + 1)}; /* Michael Somos, Dec 17 2016 */
CROSSREFS
Sequence in context: A278499 A231132 A290327 * A307681 A331922 A198826
KEYWORD
sign,easy
AUTHOR
Paul Curtz, Sep 17 2007
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 24 20:08 EDT 2024. Contains 371963 sequences. (Running on oeis4.)