This site is supported by donations to The OEIS Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A255368 a(n) = -(-1)^n * 2 * n / 3 if n divisible by 3, a(n) = -(-1)^n * n otherwise. 1
 0, 1, -2, 2, -4, 5, -4, 7, -8, 6, -10, 11, -8, 13, -14, 10, -16, 17, -12, 19, -20, 14, -22, 23, -16, 25, -26, 18, -28, 29, -20, 31, -32, 22, -34, 35, -24, 37, -38, 26, -40, 41, -28, 43, -44, 30, -46, 47, -32, 49, -50, 34, -52, 53, -36, 55, -56, 38, -58, 59 (list; graph; refs; listen; history; text; internal format)
 OFFSET 0,3 LINKS G. C. Greubel, Table of n, a(n) for n = 0..2500 Index entries for linear recurrences with constant coefficients, signature (0,0,-2,0,0,-1). FORMULA Euler transform of length 6 sequence [ -2, 1, -2, -1, 0, 2]. a(n) is multiplicative with a(2^e) = -(2^e) if e>0, a(3^e) = 2 * 3^(e-1) if e>0, otherwise a(p^e) = p^e. G.f.: f(x) - f(x^3) where f(x) := x / (1 + x)^2. G.f.: x * (1 - x)^2 * (1 + x^2) / (1 + x^3)^2. G.f.: x * (1 - x)^2 * (1 - x^3)^2 * (1 - x^4) / ((1 - x^2) * (1 - x^6)^2). a(n) = -a(-n) = -(-1)^n * A186101(n) for all n in Z. EXAMPLE G.f. = x - 2*x^2 + 2*x^3 - 4*x^4 + 5*x^5 - 4*x^6 + 7*x^7 - 8*x^8 + 6*x^9 + ... MATHEMATICA a[ n_] := -(-1)^n If[ Divisible[ n, 3], 2 n/3, n]; a[ n_] := n {1, -1, 2/3, -1, 1, -2/3}[[Mod[n, 6, 1]]]; CoefficientList[Series[x*(1-x)^2*(1+x^2)/(1+x^3)^2, {x, 0, 60}], x] (* G. C. Greubel, Aug 02 2018 *) PROG (PARI) {a(n) = -(-1)^n * if( n%3, n, 2*n/3)}; (PARI) x='x+O('x^60); concat([0], Vec(x*(1-x)^2*(1+x^2)/(1+x^3)^2)) \\ G. C. Greubel, Aug 02 2018 (MAGMA) m:=60; R:=PowerSeriesRing(Integers(), m); [0] cat Coefficients(R!(x*(1-x)^2*(1+x^2)/(1+x^3)^2)); // G. C. Greubel, Aug 02 2018 CROSSREFS Cf. A186101. Sequence in context: A293974 A138557 A129303 * A186101 A284722 A202876 Adjacent sequences:  A255365 A255366 A255367 * A255369 A255370 A255371 KEYWORD sign,mult,easy AUTHOR Michael Somos, May 04 2015 STATUS approved

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

Last modified August 21 23:01 EDT 2019. Contains 326169 sequences. (Running on oeis4.)