# Greetings from The On-Line Encyclopedia of Integer Sequences! http://oeis.org/ Search: id:a266313 Showing 1-1 of 1 %I A266313 #27 Mar 07 2024 11:13:57 %S A266313 0,1,2,3,4,3,2,1,0,1,2,3,4,3,2,1,0,1,2,3,4,3,2,1,0,1,2,3,4,3,2,1,0,1, %T A266313 2,3,4,3,2,1,0,1,2,3,4,3,2,1,0,1,2,3,4,3,2,1,0,1,2,3,4,3,2,1,0,1,2,3, %U A266313 4,3,2,1,0,1,2,3,4,3,2,1,0,1,2,3,4,3 %N A266313 Period 8 zigzag sequence; repeat [0, 1, 2, 3, 4, 3, 2, 1]. %C A266313 Decimal expansion of 1111/90009. - _Elmo R. Oliveira_, Mar 03 2024 %H A266313 Index entries for linear recurrences with constant coefficients, signature (1,0,0,-1,1). %F A266313 G.f.: x*(1+x+x^2+x^3)/(1-x+x^4-x^5). %F A266313 a(n) = a(n-1) - a(n-4) + a(n-5) for n > 4. %F A266313 a(n) = Sum_{i = 1..n} (-1)^floor((i-1)/4). %F A266313 a(2n) = 2*A007877(n); a(2n+1) = A084101(n). %F A266313 a(n) = abs(n - 8*round(n/8)). - _Jon E. Schoenfield_, Jan 01 2016 %F A266313 Euler transform of length 8 sequence [2, 0, 0, -2, 0, 0, 0, 1]. - _Michael Somos_, Feb 27 2020 %F A266313 a(n) = a(n-8) for n >= 8. - _Wesley Ivan Hurt_, Sep 07 2022 %e A266313 G.f. = x + 2*x^2 + 3*x^3 + 4*x^4 + 3*x^5 + 2*x^6 + x^7 + x^9 + ... - _Michael Somos_, Feb 27 2020 %p A266313 A266313:=n->[0, 1, 2, 3, 4, 3, 2, 1][(n mod 8)+1]: seq(A266313(n), n=0..100); %t A266313 CoefficientList[Series[x*(1 + x + x^2 + x^3)/(1 - x + x^4 - x^5), {x, 0, 100}], x] %o A266313 (Magma) &cat[[0, 1, 2, 3, 4, 3, 2, 1]: n in [0..10]]; %o A266313 (PARI) x='x+O('x^100); concat(0, Vec(x*(1+x+x^2+x^3)/(1-x+x^4-x^5))) \\ _Altug Alkan_, Dec 29 2015 %o A266313 (PARI) {a(n) = abs((n+4)\8*8-n)}; /* _Michael Somos_, Feb 27 2020 */ %Y A266313 Period k zigzag sequences: A000035 (k=2), A007877 (k=4), A260686 (k=6), this sequence (k=8), A271751 (k=10), A271832 (k=12), A279313 (k=14), A279319 (k=16), A158289 (k=18). %Y A266313 Cf. A084101. %K A266313 nonn,easy %O A266313 0,3 %A A266313 _Wesley Ivan Hurt_, Dec 26 2015 # Content is available under The OEIS End-User License Agreement: http://oeis.org/LICENSE