login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

Consider a row of standard dice as a counter. This sequence enumerates the number of changes (one face rotated over an edge to an adjacent face) from n-1 to n.
0

%I #4 Oct 07 2012 12:32:14

%S 0,1,1,2,1,1,3,1,1,2,1,1,3,1,1,2,1,1,4,1,1,2,1,1,3,1,1,2,1,1,3,1,1,2,

%T 1,1,5,1,1,2,1,1,3,1,1,2,1,1,3,1,1,2,1,1,4,1,1,2,1,1,3,1,1,2,1,1,3,1,

%U 1,2,1,1,5,1,1,2,1,1,3,1,1,2,1,1,3,1,1,2,1,1,4,1,1,2,1,1,3,1,1,2,1,1,3,1,1

%N Consider a row of standard dice as a counter. This sequence enumerates the number of changes (one face rotated over an edge to an adjacent face) from n-1 to n.

%C Most counters 'zero' out at '0' but the dice 'zero' out at '1' which is the initial state. So to increment 1 -> 2 requires 1 move, 2 -> 3 requires 1 move, 3 -> 4 requires 2 moves, 4 -> 5 requires 1 move, 5 -> 6 requires 1 move and 6 -> 0 requires 2 moves.

%C First occurrence of k (A026532): 1, 3, 6, 18, 36, 108, 216, 648, 1296, 3888, ....

%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/Dice.html">Dice</a>.

%H Wikipedia, <a href="http://en.wikipedia.org/wiki/Dice">Dice</a>.

%t f[n_] := Block[{a = IntegerDigits[n - 1, 6] + 1, b = IntegerDigits[n, 6] + 1, c}, If[Length@b > Length@a, a = Prepend[a, 1]]; c = Transpose[{a, b}] /. {{d_, d_} -> 0, {1, 2} -> 1, {2, 3} -> 1, {3, 4} -> 2, {4, 5} -> 1, {5, 6} -> 1, {6, 1} -> 2}; Plus @@ c]; Array[f, 105]

%Y Cf. A057436, A060852, A026532, A133794.

%K nonn

%O 0,4

%A _Robert G. Wilson v_, Apr 18 2008