This site is supported by donations to The OEIS Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A280193 a(2*n) = 2, a(2*n + 1) = -1, a(0) = 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 0,3 LINKS G. C. Greubel, Table of n, a(n) for n = 0..5000 Index entries for linear recurrences with constant coefficients, signature (0,1). FORMULA Euler transform of length 6 sequence [-1, 2, 1, 0, 0, -1]. Moebius transform is length 2 sequence [-1, 3]. a(n) = -b(n) where b() is multiplicative with b(2^e) = -2 if e>0, b(p^e) = 1 otherwise. G.f.: (1 - x + x^2) / (1 - x^2). G.f.: (1 - x) * (1 - x^6) / ((1 - x^3) * (1 -x^2)^2). G.f.: 1 / (1 + x / (1 + x / (1 - 3*x / (1 + x)))). a(n) = (-1)^n * A040001(n). A028242(n) = Sum_{k=0..n} a(k). A117575(n+1) = Product_{k=0..n} a(k). A000225(n-1) = Sum_{k=0..n} binomial(n, k) * a(k) if n>0. A000325(n) = Sum_{k=0..n} binomial(n, k+1) * a(k) if n>0. a(n) = Sum_{k=0..n} binomial(n, k) * (-1)^k * A083329(k). A079583(n) = p(-1) where p(x) is the unique degree-n polynomial such that p(k) = a(k) for k = 0, 1, ..., n. a(n) = A168361(n+1), n>0. - R. J. Mathar, Jan 04 2017 EXAMPLE G.f. = 1 - x + 2*x^2 - x^3 + 2*x^4 - x^5 + 2*x^6 - x^7 + 2*x^8 - x^9 + ... MATHEMATICA a[ n_] := Which[ n < 1, Boole[n == 0], OddQ[n], -1, True, 2]; a[ n_] := SeriesCoefficient[ (1 - x + x^2) / (1 - x^2), {x, 0, n}]; PROG (PARI) {a(n) = if( n<1, n==0, 2 - 3*(n%2))}; (PARI) {a(n) = if( n<1, n==0, [2, -1][n%2 + 1])}; (PARI) {a(n) = if( n<0, 0, polcoeff( (1 - x + x^2) / (1 - x^2) + x * O(x^n), n))}; (MAGMA) m:=50; R:=PowerSeriesRing(Integers(), m); Coefficients(R!((1 - x+x^2)/(1-x^2))); // G. C. Greubel, Jul 29 2018 CROSSREFS Cf. A000225, A000325, A040001, A028242, A079583, A083329, A117575. Sequence in context: A063435 A262352 A167964 * A327767 A228826 A288699 Adjacent sequences:  A280190 A280191 A280192 * A280194 A280195 A280196 KEYWORD sign,easy AUTHOR Michael Somos, Dec 28 2016 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 October 19 13:01 EDT 2019. Contains 328222 sequences. (Running on oeis4.)