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

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A247060 Dynamic Betting Game D(n,4,1). 7
 1, 5, 8, 12, 16, 17, 21, 24, 28, 32, 33, 37, 40, 44, 48, 49, 53, 56, 60, 64, 65, 69, 72, 76, 80, 81, 85, 88, 92, 96, 97, 101, 104, 108, 112, 113, 117, 120, 124, 128, 129, 133, 136, 140, 144, 145, 149, 152, 156, 160, 161, 165, 168, 172, 176 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,2 COMMENTS 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. LINKS Vincenzo Librandi, Table of n, a(n) for n = 1..10000 Charles Jwo-Yue Lien, Dynamic Betting Game, Southeast Asian Bulletin of Mathematics, 2015, Vol. 39 Issue 6, pp. 799-814. Index entries for linear recurrences with constant coefficients, signature (1,0,0,0,1,-1). FORMULA a(n) = floor(8*n/5) + 2*floor(4*n/5). a(n) = a(n-1) + a(n-5) - a(n-6). - Colin Barker, Sep 11 2014 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 EXAMPLE 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. MATHEMATICA Table[(Floor[8 n/5] + 2 Floor[4 n/5]), {n, 60}] (* Vincenzo Librandi, Sep 14 2014 *) LinearRecurrence[{1, 0, 0, 0, 1, -1}, {1, 5, 8, 12, 16, 17}, 60] (* Harvey P. Dale, Jun 07 2020 *) PROG (PARI) vector(100, n, floor(8*n/5)+2*floor(4*n/5)) \\ Derek Orr, Sep 11 2014 (PARI) 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 (Magma) [Floor(8*n/5) + 2*Floor(4*n/5): n in [1..60]]; // Vincenzo Librandi, Sep 14 2014 CROSSREFS Cf. A247061, A247062, A247063, A247064, A247160, A247161. Sequence in context: A322534 A314402 A133795 * A314403 A314404 A314405 Adjacent sequences: A247057 A247058 A247059 * A247061 A247062 A247063 KEYWORD nonn,easy AUTHOR Charles Jwo-Yue Lien, Sep 10 2014 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.

Last modified August 4 01:40 EDT 2024. Contains 374905 sequences. (Running on oeis4.)