[go: up one dir, main page]

login
A247061
Dynamic Betting Game D(n,5,1).
9
1, 8, 16, 17, 24, 32, 33, 40, 48, 49, 56, 64, 65, 72, 80, 81, 88, 96, 97, 104, 112, 113, 120, 128, 129, 136, 144, 145, 152, 160, 161, 168, 176, 177, 184, 192, 193, 200, 208, 209, 216, 224, 225, 232, 240, 241, 248, 256
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 = 5 and r = 1.
LINKS
Charles Jwo-Yue Lien, Dynamic Betting Game, Southeast Asian Bulletin of Mathematics, 2015, Vol. 39 Issue 6, pp. 799-814.
FORMULA
With a(0)=0, a(n+1)-a(n) is a periodic function of n with value = 1, 7, 8.
From Colin Barker, Sep 11 2014: (Start)
a(n) = a(n-1) + a(n-3) - a(n-4).
G.f.: x*(8*x^2+7*x+1) / ((x-1)^2*(x^2+x+1)). (End)
E.g.f.: (3*exp(x)*(16*x - 7) + exp(-x/2)*(21*cos(sqrt(3)*x/2) - 5*sqrt(3)*sin(sqrt(3)*x/2)))/9. - Stefano Spezia, Aug 28 2024
EXAMPLE
In the case of n=3: For the 1st round, player A bets 2. If A loses, A will end up with 16 by betting all he has for the last 4 rounds. If A wins, he has 5 and will end up with D(5,4,1)=16 per reference A247060. If A does not follow the proposed bet, he will have fewer than 16 at the end. So a(3) = 16.
MATHEMATICA
LinearRecurrence[{1, 0, 1, -1}, {1, 8, 16, 17}, 100] (* Paolo Xausa, Aug 27 2024 *)
PROG
(PARI) Vec(x*(8*x^2+7*x+1)/((x-1)^2*(x^2+x+1)) + O(x^100)) \\ Colin Barker, Sep 11 2014
(Haskell)
a247061 n = a247061_list !! (n-1)
a247061_list = [1, 8, 16, 17] ++ zipWith (+)
(drop 3 a247061_list) (zipWith (-) (tail a247061_list) a247061_list)
-- Reinhard Zumkeller, Sep 19 2014
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
STATUS
approved