|
|
A266313
|
|
Period 8 zigzag sequence; repeat [0, 1, 2, 3, 4, 3, 2, 1].
|
|
9
|
|
|
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, 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, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,3
|
|
COMMENTS
|
|
|
LINKS
|
|
|
FORMULA
|
G.f.: x*(1+x+x^2+x^3)/(1-x+x^4-x^5).
a(n) = a(n-1) - a(n-4) + a(n-5) for n > 4.
a(n) = Sum_{i = 1..n} (-1)^floor((i-1)/4).
Euler transform of length 8 sequence [2, 0, 0, -2, 0, 0, 0, 1]. - Michael Somos, Feb 27 2020
|
|
EXAMPLE
|
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
|
|
MAPLE
|
A266313:=n->[0, 1, 2, 3, 4, 3, 2, 1][(n mod 8)+1]: seq(A266313(n), n=0..100);
|
|
MATHEMATICA
|
CoefficientList[Series[x*(1 + x + x^2 + x^3)/(1 - x + x^4 - x^5), {x, 0, 100}], x]
|
|
PROG
|
(Magma) &cat[[0, 1, 2, 3, 4, 3, 2, 1]: n in [0..10]];
(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
(PARI) {a(n) = abs((n+4)\8*8-n)}; /* Michael Somos, Feb 27 2020 */
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,easy
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|