The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A184334 Period 6 sequence [0, 2, 2, 0, -2, -2, ...] except a(0) = 1. 6
 1, 2, 2, 0, -2, -2, 0, 2, 2, 0, -2, -2, 0, 2, 2, 0, -2, -2, 0, 2, 2, 0, -2, -2, 0, 2, 2, 0, -2, -2, 0, 2, 2, 0, -2, -2, 0, 2, 2, 0, -2, -2, 0, 2, 2, 0, -2, -2, 0, 2, 2, 0, -2, -2, 0, 2, 2, 0, -2, -2, 0, 2, 2, 0, -2, -2, 0, 2, 2, 0, -2, -2, 0, 2, 2, 0, -2, -2, 0, 2, 2, 0, -2, -2, 0, 2, 2, 0, -2, -2, 0 (list; graph; refs; listen; history; text; internal format)
 OFFSET 0,2 LINKS G. C. Greubel, Table of n, a(n) for n = 0..2500 Michael Somos, Rational Function Multiplicative Coefficients Index entries for linear recurrences with constant coefficients, signature (1,-1) FORMULA a(n) = 2 * b(n) where b() is multiplicative with b(2^e) = (-1)^(e-1) if e>0, b(3^e) = 0^e, b(p^e) = 1 if p == 1 mod 6, b(p^e) = (-1)^e if p == 5 mod 6. Euler transform of length 6 sequence [2, -1, -2, 0, 0, 1]. G.f. A(x) satisfies 0 = f(A(x), A(x^2)) where f(u, v) = 2 * u * (v - 1) - (u - 1)^2 * v. G.f.: (1 + x + x^2) / (1 - x + x^2). a(-n) = -a(n) unless n = 0. a(n+3) = -a(n) unless n = 0 or n = -3. G.f.: 1 / (1 - 2*x / (1 + x / (1 - x / (1 + x)))). - Michael Somos, Jan 03 2013 a(n) = A130772(n-1) if n>0. 3*a(n) = -(n mod 6) + ((n+2) mod 6) + ((n+3) mod 6) - ((n+5) mod 6) + 3*(binomial(2*n,n) mod 2). - Paolo P. Lava, Mar 10 2011 a(n) = A257076(n-1) = A109265(n-2) if n>2. - Michael Somos, Sep 01 2015 EXAMPLE G.f. = 1 + 2*x + 2*x^2 - 2*x^4 - 2*x^5 + 2*x^7 + 2*x^8 - 2*x^10 - 2*x^11 + ... MATHEMATICA PadRight[{1}, 120, {0, 2, 2, 0, -2, -2}] (* Harvey P. Dale, Apr 02 2015 *) a[ n_] := Boole[n == 0] + {2, 2, 0, -2, -2, 0}[[Mod[n, 6, 1]]]; (* Michael Somos, Sep 01 2015 *) PROG (PARI) {a(n) = (n==0) + [ 0, 2, 2, 0, -2, -2][n%6+1]}; (PARI) {a(n) = (n==0) + 2 * (-1)^(n\3) * sign( n%3)}; (MAGMA) m:=30; R:=PowerSeriesRing(Integers(), m); Coefficients(R!((1 + x+x^2)/(1-x+x^2))); // G. C. Greubel, Aug 04 2018 CROSSREFS Cf. A109265, A130772, A257076. Sequence in context: A130772 A257076 A109265 * A225399 A035668 A307757 Adjacent sequences:  A184331 A184332 A184333 * A184335 A184336 A184337 KEYWORD sign,easy AUTHOR Michael Somos, Feb 13 2011 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 May 7 10:46 EDT 2021. Contains 343650 sequences. (Running on oeis4.)