|
|
A271751
|
|
Period 10 zigzag sequence; repeat: [0, 1, 2, 3, 4, 5, 4, 3, 2, 1].
|
|
10
|
|
|
0, 1, 2, 3, 4, 5, 4, 3, 2, 1, 0, 1, 2, 3, 4, 5, 4, 3, 2, 1, 0, 1, 2, 3, 4, 5, 4, 3, 2, 1, 0, 1, 2, 3, 4, 5, 4, 3, 2, 1, 0, 1, 2, 3, 4, 5, 4, 3, 2, 1, 0, 1, 2, 3, 4, 5, 4, 3, 2, 1, 0, 1, 2, 3, 4, 5, 4, 3, 2, 1, 0, 1, 2, 3, 4, 5, 4, 3, 2, 1, 0, 1, 2, 3, 4, 5
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,3
|
|
COMMENTS
|
|
|
LINKS
|
|
|
FORMULA
|
G.f.: x*(1 + x + x^2 + x^3 + x^4)/(1 - x + x^5 - x^6).
a(n) = a(n-1) - a(n-5) + a(n-6) for n>5.
a(n) = abs(n - 10*round(n/10)).
a(n) = Sum_{i=1..n} (-1)^floor((i-1)/5).
|
|
MAPLE
|
a:=n->[0, 1, 2, 3, 4, 5, 4, 3, 2, 1][(n mod 10)+1]: seq(a(n), n=0..100);
|
|
MATHEMATICA
|
CoefficientList[Series[x*(1 + x + x^2 + x^3 + x^4)/(1 - x + x^5 - x^6), {x, 0, 30}], x]
|
|
PROG
|
(Magma) &cat[[0, 1, 2, 3, 4, 5, 4, 3, 2, 1]: n in [0..10]];
(PARI) a(n) = abs(n-10*round(n/10)); \\ Altug Alkan, Apr 13 2016
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,easy
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|