login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A276165 a(n) is the first-player score difference of a "Coins in a Row" game over the n-th row of A066099 using a minimax strategy. 3
0, 1, 2, 0, 3, 1, 1, 1, 4, 2, 0, 2, 2, 0, 2, 0, 5, 3, 1, 3, 1, 1, 1, 1, 3, -1, 1, 1, 3, 1, 1, 1, 6, 4, 2, 4, 0, 2, 2, 2, 2, 0, 2, 0, 2, 2, 0, 2, 4, -2, 0, 2, 2, 0, 2, 0, 4, 2, 0, 0, 2, 0, 2, 0, 7, 5, 3, 5, 1, 3, 3, 3, 1, 1, 3, 1, 1, 3, 1, 3, 3, -1, 1, 1, 3, 1 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,3
COMMENTS
"Coins in a Row" is a game in which players alternate picking up coins of varying denominations from the end of the row in an attempt to collect as many points as possible.
When a(n) is negative, the second player has a strategy that is guaranteed to collect more points.
REFERENCES
Peter Winkler, Mathematical Puzzles: A Connoisseur's Collection, A K Peters/CRC Press, 2003, pages 1-2.
LINKS
FORMULA
a(n) = A276166(n) - A276167(n).
EXAMPLE
Let [R,L,L,L] represent a game in which the first player takes the right coin, the second player takes the left coin, the first player takes the left coin, and the second player takes the left (only remaining) coin.
A066099_Row(0) = [0]; a(0) = 0 via [L]
A066099_Row(1) = [1]; a(1) = 1 via [L]
A066099_Row(3) = [1,1]; a(3) = 0 via [R,L]
A066099_Row(22) = [2,1,2]; a(22) = 1 via [L,R,L]
A066099_Row(88) = [2,1,4]; a(88) = 3 via [R,L,L]
A066099_Row(1418) = [2,1,4,2,2]; a(1418) = -1 via [L,R,R,R,L]
PROG
(Haskell)
minimax [] = 0
minimax as = max (head as - minimax (tail as)) (last as - minimax (init as))
a276165 = minimax . a066099_row
CROSSREFS
Sequence in context: A113504 A358726 A357623 * A344618 A124754 A357624
KEYWORD
sign
AUTHOR
Peter Kagey, Aug 25 2016
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 19 19:02 EDT 2024. Contains 371798 sequences. (Running on oeis4.)