This site is supported by donations to The OEIS Foundation.

Thanks to everyone who made a donation during our annual appeal!
To see the list of donors, or make a donation, see the OEIS Foundation home page.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A260686 Period 6 zigzag sequence, repeat [0, 1, 2, 3, 2, 1]. 10
 0, 1, 2, 3, 2, 1, 0, 1, 2, 3, 2, 1, 0, 1, 2, 3, 2, 1, 0, 1, 2, 3, 2, 1, 0, 1, 2, 3, 2, 1, 0, 1, 2, 3, 2, 1, 0, 1, 2, 3, 2, 1, 0, 1, 2, 3, 2, 1, 0, 1, 2, 3, 2, 1, 0, 1, 2, 3, 2, 1, 0, 1, 2, 3, 2, 1, 0, 1, 2, 3, 2, 1, 0, 1, 2, 3, 2, 1, 0, 1, 2, 3, 2, 1, 0, 1 (list; graph; refs; listen; history; text; internal format)
 OFFSET 0,3 LINKS Index entries for linear recurrences with constant coefficients, signature (1,0,-1,1). FORMULA G.f.: x*(1 + x + x^2) / (1 - x + x^3 - x^4). a(n) = a(n-1) - a(n-3) + a(n-4) for n>3. a(n) = Sum_{i=1..n} (-1)^floor((i-1)/3) for n>0. a(n+1) = a(n) + A130151(n). a(2n) = 2*A011655(n), a(2n+1) = A109007(n+2). a(n) = 1 + (1 - (-1)^n)/2 - (-1)^floor((n+1)/3). [Bruno Berselli, Nov 16 2015] a(n) = sin(n*Pi/6)^2*(11+4*cos(n*Pi/3)+2*cos(2*n*Pi/3))/3. - Wesley Ivan Hurt, Jun 17 2016 a(n) = 3/2-1/6*(-1)^n-2/3*((1/2-(1/2*I)*sqrt(3))^n+(1/2+(1/2*I)*sqrt(3))^n) where I=sqrt(-1). - Paolo P. Lava, Jun 17 2016 MAPLE A260686:=n->[0, 1, 2, 3, 2, 1][(n mod 6)+1]: seq(A260686(n), n=0..100); MATHEMATICA CoefficientList[Series[(x + x^2 + x^3)/(1 - x + x^3 - x^4), {x, 0, 100}], x] Table[1 + (1 - (-1)^n)/2 - (-1)^Floor[(n + 1)/3], {n, 0, 100}] (* Bruno Berselli, Nov 16 2015 *) PadRight[{}, 120, {0, 1, 2, 3, 2, 1}] (* Vincenzo Librandi, Nov 17 2015 *) PROG (PARI) concat(0, Vec((x+x^2+x^3)/(1-x+x^3-x^4) + O(x^100))) \\ Altug Alkan, Nov 15 2015 (MAGMA) [1+(1-(-1)^n)/2-(-1)^Floor((n+1)/3): n in [0..100]]; // Bruno Berselli, Nov 16 2015 (MAGMA) &cat[[0, 1, 2, 3, 2, 1]: n in [0..15]]; // Vincenzo Librandi, Nov 17 2015 CROSSREFS Period k zigzag sequences: A000035 (k=2), A007877 (k=4), this sequence (k=6), A266313 (k=8), A271751 (k=10), A271832 (k=12), A279313 (k=14), A279319 (k=16), A158289 (k=18). Cf. A011655, A109007, A130151. Sequence in context: A059285 A165578 A020990 * A037891 A037899 A037837 Adjacent sequences:  A260683 A260684 A260685 * A260687 A260688 A260689 KEYWORD nonn,easy AUTHOR Wesley Ivan Hurt, Nov 15 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 January 18 09:00 EST 2019. Contains 319269 sequences. (Running on oeis4.)