|
|
A271832
|
|
Period 12 zigzag sequence: repeat [0,1,2,3,4,5,6,5,4,3,2,1].
|
|
10
|
|
|
0, 1, 2, 3, 4, 5, 6, 5, 4, 3, 2, 1, 0, 1, 2, 3, 4, 5, 6, 5, 4, 3, 2, 1, 0, 1, 2, 3, 4, 5, 6, 5, 4, 3, 2, 1, 0, 1, 2, 3, 4, 5, 6, 5, 4, 3, 2, 1, 0, 1, 2, 3, 4, 5, 6, 5, 4, 3, 2, 1, 0, 1, 2, 3, 4, 5, 6, 5, 4, 3, 2, 1, 0, 1, 2, 3, 4, 5, 6, 5, 4, 3, 2, 1, 0, 1
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,3
|
|
COMMENTS
|
a(n)/36 is the probability that the sum shown after rolling a pair of standard dice is 1+(n mod 12). - Mathew Englander, Jul 11 2022
|
|
LINKS
|
|
|
FORMULA
|
G.f.: x*(1 + x + x^2 + x^3 + x^4 + x^5)/(1 - x + x^6 - x^7).
a(n) = a(n-1) - a(n-6) + a(n-7) for n>6.
a(n) = abs(n - 12*round(n/12)).
a(n) = Sum_{i=1..n} (-1)^floor((i-1)/6).
|
|
MAPLE
|
A271832:=n->[0, 1, 2, 3, 4, 5, 6, 5, 4, 3, 2, 1][(n mod 12)+1]: seq(A271832(n), n=0..300);
|
|
MATHEMATICA
|
CoefficientList[Series[x*(1 + x + x^2 + x^3 + x^4 + x^5)/(1 - x + x^6 - x^7), {x, 0, 100}], x]
|
|
PROG
|
(Magma) &cat[[0, 1, 2, 3, 4, 5, 6, 5, 4, 3, 2, 1]: n in [0..10]];
(PARI) lista(nn) = for(n=0, nn, print1(abs(n-12*round(n/12)), ", ")); \\ Altug Alkan, Apr 15 2016
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,easy
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|