login
Dynamic Betting Game D(n,4,1).
7

%I #49 Apr 25 2023 17:51:25

%S 1,5,8,12,16,17,21,24,28,32,33,37,40,44,48,49,53,56,60,64,65,69,72,76,

%T 80,81,85,88,92,96,97,101,104,108,112,113,117,120,124,128,129,133,136,

%U 140,144,145,149,152,156,160,161,165,168,172,176

%N Dynamic Betting Game D(n,4,1).

%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 = 4 and r = 1. Note that with a(0)=0, a(n+1)-a(n) is a periodic function of n with value = 1,4,3,4,4.

%H Vincenzo Librandi, <a href="/A247060/b247060.txt">Table of n, a(n) for n = 1..10000</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_06">Index entries for linear recurrences with constant coefficients</a>, signature (1,0,0,0,1,-1).

%F a(n) = floor(8*n/5) + 2*floor(4*n/5).

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

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

%e In the case of n=2: For the 1st round, player A bets 1. B will let A win, otherwise A will end up with 8 by betting all he has for the last 3 rounds. For the 2nd round, A has 3 and bets 1. B will let A win, otherwise A will end up with 8 by betting all he has for the last 2 rounds. For the 3rd round, A has 4 and bets 1. B will let A win, otherwise A will end up with 6 by betting all he has at the last round. For the 4th round, A has 5 and bets 0. So A ends up with 5. If A bets more than 1 in any of the prior rounds, B will let A lose and A will have fewer than 5 at the end. So a(2) = 5.

%t Table[(Floor[8 n/5] + 2 Floor[4 n/5]), {n, 60}] (* _Vincenzo Librandi_, Sep 14 2014 *)

%t LinearRecurrence[{1,0,0,0,1,-1},{1,5,8,12,16,17},60] (* _Harvey P. Dale_, Jun 07 2020 *)

%o (PARI)

%o vector(100,n,floor(8*n/5)+2*floor(4*n/5)) \\ _Derek Orr_, Sep 11 2014

%o (PARI)

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

%o (Magma) [Floor(8*n/5) + 2*Floor(4*n/5): n in [1..60]]; // _Vincenzo Librandi_, Sep 14 2014

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

%K nonn,easy

%O 1,2

%A _Charles Jwo-Yue Lien_, Sep 10 2014