A276168 a(n) is the minimum first-player score difference of a "Coins in a Row" game over all permutations of coins 1..n with both players using a minimax strategy.
1, 1, 0, 0, -3, 1, -8, 0, -15, 1, -24, 0, -35, 1, -48, 0
Offset: 1
Examples
a(1) = 1; via [1] a(2) = 1; via [1,2] a(3) = 0; via [1,3,2] a(4) = 0; via [1,2,4,3] a(5) = -3; via [1,4,2,5,3] a(6) = 1; via [1,2,3,4,6,5] a(7) = -8; via [1,5,2,6,3,7,4] a(8) = 0; via [1,2,3,4,6,5,8,7] a(9) = -15; via [1,6,2,7,3,8,4,9,5]
References
- Peter Winkler, Mathematical Puzzles: A Connoisseur's Collection, A K Peters/CRC Press, 2003, pages 1-2.
Crossrefs
Cf. A276163.
Programs
-
Haskell
minimax [] = 0 minimax as = max (head as - minimax (tail as)) (last as - minimax (init as)) a276168 n = minimum $ map minimax $ permutations [1..n]
Extensions
a(11)-a(16) from Bert Dobbelaere, May 04 2025
Comments