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!)
 A327767 Period 2: repeat [1, -2]. 1
 1, -2, 1, -2, 1, -2, 1, -2, 1, -2, 1, -2, 1, -2, 1, -2, 1, -2, 1, -2, 1, -2, 1, -2, 1, -2, 1, -2, 1, -2, 1, -2, 1, -2, 1, -2, 1, -2, 1, -2, 1, -2, 1, -2, 1, -2, 1, -2, 1, -2, 1, -2, 1, -2, 1, -2, 1, -2, 1, -2, 1, -2, 1, -2, 1, -2, 1, -2, 1, -2, 1, -2, 1, -2 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,2 LINKS Michael Somos, Rational Function Multiplicative Coefficients Index to sequences with linear recurrences with constant coefficients, signature (0,1). FORMULA G.f.: x * (1 - 2*x) / (1 - x^2) = x / (1 + 2*x / (1 - 3*x / (2 - x))). E.g.f.: (exp(x) - 1)*(3/exp(x) - 1)/2. a(n) is multiplicative with b(2^e) = -2 if e>0, b(p^e) = 1 otherwise. Moebius transform is length 2 sequence [1, -3]. a(n) = -(1 + 3*(-1)^n)/2 if n>=1. a(2*n) = -2, a(2*n + 1) = 1, a(0) = 0. a(n) = -(-1)^n * A134451(n) for all n in Z. a(n) = a(n+2) = -(-1)^n * A000034(n-1) = -A168361(n+1) for n>=1. EXAMPLE G.f. = x - 2*x^2 + x^3 - 2*x^4 + x^5 - 2*x^6 + x^7 - 2*x^8 + ... MATHEMATICA a[ n_] := If[ n < 1, 0, -2 + 3 Mod[n, 2]]; a[ n_] := Which[ n < 1, 0, OddQ[n], 1, True, -2]; a[ n_] := SeriesCoefficient[ (x - 2*x^2) / (1 - x^2), {x, 0, n}]; PadRight[{}, 100, {1, -2}] (* Vincenzo Librandi, Feb 29 2020 *) PROG (PARI) {a(n) = if( n<1, 0, -(1 + 3*(-1)^n)/2)}; (PARI) {a(n) = if( n<1, 0, -2 + 3*(n%2))}; (PARI) {a(n) = if( n<1, 0, [-2, 1][n%2 + 1])}; (PARI) {a(n) = if( n<0, 0, polcoeff( (x - 2*x^2) / (1 - x^2) + x * O(x^n), n))}; (MAGMA) &cat [[1, -2]^^50]; // Vincenzo Librandi, Feb 29 2020 CROSSREFS Cf. A000034, A040001, A134451, A168361, A280193. Sequence in context: A262352 A167964 A280193 * A228826 A288699 A168361 Adjacent sequences:  A327764 A327765 A327766 * A327768 A327769 A327770 KEYWORD sign,mult,easy AUTHOR Michael Somos, Sep 24 2019 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 16 11:50 EDT 2021. Contains 343942 sequences. (Running on oeis4.)