This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A276165 #23 Aug 27 2016 02:11:23 %S A276165 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, %T A276165 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, %U A276165 1,3,3,3,1,1,3,1,1,3,1,3,3,-1,1,1,3,1 %N 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. %C A276165 "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. %C A276165 When a(n) is negative, the second player has a strategy that is guaranteed to collect more points. %D A276165 Peter Winkler, Mathematical Puzzles: A Connoisseur's Collection, A K Peters/CRC Press, 2003, pages 1-2. %H A276165 Peter Kagey, <a href="/A276165/b276165.txt">Table of n, a(n) for n = 0..10000</a> %F A276165 a(n) = A276166(n) - A276167(n). %e A276165 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. %e A276165 A066099_Row(0) = [0]; a(0) = 0 via [L] %e A276165 A066099_Row(1) = [1]; a(1) = 1 via [L] %e A276165 A066099_Row(3) = [1,1]; a(3) = 0 via [R,L] %e A276165 A066099_Row(22) = [2,1,2]; a(22) = 1 via [L,R,L] %e A276165 A066099_Row(88) = [2,1,4]; a(88) = 3 via [R,L,L] %e A276165 A066099_Row(1418) = [2,1,4,2,2]; a(1418) = -1 via [L,R,R,R,L] %o A276165 (Haskell) %o A276165 minimax [] = 0 %o A276165 minimax as = max (head as - minimax (tail as)) (last as - minimax (init as)) %o A276165 a276165 = minimax . a066099_row %Y A276165 Cf. A276163, A276164, A276166, A276167. %K A276165 sign %O A276165 0,3 %A A276165 _Peter Kagey_, Aug 25 2016