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!)
A280166 a(2*n) = 4*n if n>0, a(2*n + 1) = -(2*n + 1), a(0) = 1. 1
1, -1, 4, -3, 8, -5, 12, -7, 16, -9, 20, -11, 24, -13, 28, -15, 32, -17, 36, -19, 40, -21, 44, -23, 48, -25, 52, -27, 56, -29, 60, -31, 64, -33, 68, -35, 72, -37, 76, -39, 80, -41, 84, -43, 88, -45, 92, -47, 96, -49, 100, -51, 104, -53, 108, -55, 112, -57, 116 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,3
LINKS
FORMULA
Euler transform of length 6 sequence [-1, 4, 1, -1, 0, -1].
a(n) = (-1)^n * A257088(n), with A257088 multiplicative (see there).
a(n) = n * A168361(n+1) if n>0.
a(2*n) = A008574(n). a(2*n + 1) = - A005408(n).
G.f.: (1 - x + x^2) * (1 + x^2) / (1 - x^2)^2.
EXAMPLE
G.f. = 1 - x + 4*x^2 - 3*x^3 + 8*x^4 - 5*x^5 + 12*x^6 - 7*x^7 + 16*x^8 + ...
MATHEMATICA
a[ n_] := Which[ n < 1, Boole[n == 0], OddQ[n], -n, True, 2 n];
a[ n_] := SeriesCoefficient[ (1 - x + x^2) (1 + x^2) / (1 - x^2)^2, {x, 0, n}];
PROG
(PARI) {a(n) = if( n<1, n==0, n%2, -n, 2*n)};
(PARI) x='x+O('x^50); Vec((1-x+x^2)*(1+x^2)/(1-x^2)^2) \\ G. C. Greubel, Aug 04 2018
(Magma) m:=50; R<x>:=PowerSeriesRing(Integers(), m); Coefficients(R!((1 - x+x^2)*(1+x^2)/(1-x^2)^2)); // G. C. Greubel, Aug 04 2018
CROSSREFS
Sequence in context: A156028 A021232 A263616 * A257088 A022998 A082895
KEYWORD
sign,easy
AUTHOR
Michael Somos, Dec 27 2016
EXTENSIONS
Edited by M. F. Hasler, May 08 2018
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 18 18:49 EDT 2024. Contains 371781 sequences. (Running on oeis4.)