login
Dynamic Betting Game D(n,5,2).
9

%I #39 Apr 25 2023 17:22:07

%S 1,2,5,6,8,11,12,16,17,18,21,22,24,27,28,32,33,34,37,38,40,43,44,48,

%T 49,50,53,54,56,59,60,64,65,66,69,70,72,75,76,80,81,82,85,86,88,91,92,

%U 96,97,98,101,102,104,107,108,112

%N Dynamic Betting Game D(n,5,2).

%C Players A and B bet in a k-round game. Player A has an initial amount of money n. In each round, player A can wager an integer between 0 and what he has. Player A then gains or loses an amount equal to his wager depending on whether player B lets him win or lose. Player B tries to minimize player A's money at the end. The number of rounds player A can lose is r. a(n) is the maximum amount of money player A can have at the end of the game for k = 5 and r = 2.

%H Reinhard Zumkeller, <a href="/A247062/b247062.txt">Table of n, a(n) for n = 1..1000</a>

%H Charles Jwo-Yue Lien, <a href="http://www.seams-bull-math.ynu.edu.cn/quick_search_result.jsp?search&amp;cond=Dynamic%20Betting%20Game">Dynamic Betting Game</a>, Southeast Asian Bulletin of Mathematics, 2015, Vol. 39 Issue 6, pp. 799-814.

%H <a href="/index/Rec#order_09">Index entries for linear recurrences with constant coefficients</a>, signature (1,0,0,0,0,0,0,1,-1).

%F With a(0)=0, a(n+1)-a(n) is a periodic function of n with value = 1,1,3,1,2,3,1,4.

%F a(n) = a(n-1) + a(n-8) - a(n-9). - _Colin Barker_, Sep 11 2014

%F G.f.: x*(4*x^7+x^6+3*x^5+2*x^4+x^3+3*x^2+x+1) / ((x-1)^2*(x+1)*(x^2+1)*(x^4+1)). - _Colin Barker_, Sep 11 2014

%e In the case of n=3: For the 1st round, player A bets 1. If A loses, A will end up with D(2,4,1)=5 per reference A247060. If A wins, he will end up with D(4,4,2)=5 per reference A247161. If A does not follow the proposed bet, he will have fewer than 5 at the end. So a(3) = 5.

%t LinearRecurrence[{1,0,0,0,0,0,0,1,-1},{1,2,5,6,8,11,12,16,17},60] (* _Harvey P. Dale_, Nov 21 2020 *)

%o (PARI) Vec(x*(4*x^7+x^6+3*x^5+2*x^4+x^3+3*x^2+x+1)/((x-1)^2*(x+1)*(x^2+1)*(x^4+1)) + O(x^100)) \\ _Colin Barker_, Sep 11 2014

%o (Haskell)

%o a247062 n = a247062_list !! (n-1)

%o a247062_list = [1,2,5,6,8,11,12,16,17] ++ zipWith (+)

%o (drop 8 a247062_list) (zipWith (-) (tail a247062_list) a247062_list)

%o -- _Reinhard Zumkeller_, Sep 19 2014

%Y Cf. A247060, A247061, A247063, A247064, A247160, A247161.

%K nonn,easy

%O 1,2

%A _Charles Jwo-Yue Lien_, Sep 10 2014