|
|
A192333
|
|
Numbers that are "unsafe" when playing the game Dollar Nim, which is a Nim game where users can remove 1, 5, 10, or 25 cents from an initial pile of money. The most common version of the game is played with an initial amount of $1, hence the name.
|
|
1
|
|
|
0, 2, 4, 6, 8, 15, 17, 19, 21, 23, 30, 32, 34, 36, 38, 45, 47, 49, 51, 53, 60, 62, 64, 66, 68, 75, 77, 79, 81, 83, 90, 92, 94, 96, 98, 105, 107, 109, 111, 113, 120, 122, 124, 126, 128, 135, 137, 139, 141, 143, 150, 152, 154, 156, 158, 165
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,2
|
|
LINKS
|
|
|
FORMULA
|
a(n) = 5*floor((n-1)/5) + 2*n - 2.
G.f.: x^2*(2 + 2*x + 2*x^2 + 2*x^3 + 7*x^4)/((x^4 + x^3 + x^2 + x + 1)*(x-1)^2). - R. J. Mathar, Jun 28 2011
|
|
EXAMPLE
|
For n = 2, a pile with 2 cents remaining is unsafe because the player would only be able to remove a penny, leaving the opponent with 1 cent and a guaranteed win.
|
|
PROG
|
(Magma) [5*Floor((n-1)/5) + 2*n - 2: n in [1..60]]; // Vincenzo Librandi, Jul 04 2011
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,easy
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|