|
|
A279313
|
|
Period 14 zigzag sequence: repeat [0,1,2,3,4,5,6,7,6,5,4,3,2,1].
|
|
12
|
|
|
0, 1, 2, 3, 4, 5, 6, 7, 6, 5, 4, 3, 2, 1, 0, 1, 2, 3, 4, 5, 6, 7, 6, 5, 4, 3, 2, 1, 0, 1, 2, 3, 4, 5, 6, 7, 6, 5, 4, 3, 2, 1, 0, 1, 2, 3, 4, 5, 6, 7, 6, 5, 4, 3, 2, 1, 0, 1, 2, 3, 4, 5, 6, 7, 6, 5, 4, 3, 2, 1, 0, 1, 2, 3, 4, 5, 6, 7, 6, 5, 4, 3, 2, 1, 0, 1
(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 + x^5 + x^6)/(1 - x + x^7 - x^8).
a(n) = a(n-1) - a(n-7) + a(n-8) for n > 7.
a(n) = abs(n - 14*round(n/14)).
a(n) = Sum_{i=1..n} (-1)^floor((i-1)/7).
|
|
MAPLE
|
A279313:=n->[0, 1, 2, 3, 4, 5, 6, 7, 6, 5, 4, 3, 2, 1][(n mod 14)+1]: seq(A279313(n), n=0..200);
|
|
MATHEMATICA
|
CoefficientList[Series[x*(1 + x + x^2 + x^3 + x^4 + x^5 + x^6)/(1 - x + x^7 - x^8), {x, 0, 100}], x]
|
|
PROG
|
(Magma) &cat[[0, 1, 2, 3, 4, 5, 6, 7, 6, 5, 4, 3, 2, 1]: n in [0..10]];
(PARI) a(n)=([0, 1, 0, 0, 0, 0, 0, 0; 0, 0, 1, 0, 0, 0, 0, 0; 0, 0, 0, 1, 0, 0, 0, 0; 0, 0, 0, 0, 1, 0, 0, 0; 0, 0, 0, 0, 0, 1, 0, 0; 0, 0, 0, 0, 0, 0, 1, 0; 0, 0, 0, 0, 0, 0, 0, 1; 1, -1, 0, 0, 0, 0, 0, 1]^n*[0; 1; 2; 3; 4; 5; 6; 7])[1, 1] \\ Charles R Greathouse IV, Dec 12 2016
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,easy
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|