cp's OEIS Frontend

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.

Showing 1-5 of 5 results.

A349697 Numerators of the probability that the first player wins the game Super Six if both players have n sticks in their hand and if there are 3 sticks on the lid, assuming optimal play.

Original entry on oeis.org

78307, 186990749618019112, 1614205257536455860879998130775735700828260230275, 10794889897425456513785608689552167481027910004023676512263195628077085109766959836330846217
Offset: 1

Views

Author

Keywords

Comments

The rules of Super Six for two players are as follows. The equipment consists of a six-sided die, a number of sticks, and a box whose lid has six holes. The holes numbered 1 through 5 are shallow, and a stick placed in any one of them will stand up in it; hole #6 goes all the way through the lid so that any stick placed in it falls into the box and is out of play. Initially, an even number of sticks are divided evenly between the two players. The goal is to get rid of all one's sticks before the other player does.
The players take turns. On each turn, the active player rolls the die and places a stick in the numbered hole that matches the number on the die (e.g., a player who rolls a 4 then places a stick in hole #4). The player may roll and place a stick for each roll as many times as desired until rolling a number that is already filled by a stick. When this occurs, the player must take that stick in hand, and play passes to the opponent.
The game proceeds with players taking turns and ends when one player has run out of sticks. The only freedom that the players have is the decision whether to continue rolling the die or not after successfully placing a stick.
The optimum strategy and the winning probabilities can be found in "Optimum Strategies for the Game Super Six" (see link below). The terms of this sequence give the numerators and the terms of sequence A349698 give the denominators of the probability that the first player wins if there are 3 sticks on the lid and both players hold n sticks in their hands, assuming optimal play. If n tends to infinity this probability tends to 1/2.

Examples

			a(1) = 78307 because the probability that the first player wins the game Super Six, when both players have 1 stick and there are 3 sticks on the lid, is 78307/127838 (0.612548...).
		

Crossrefs

A345383 a(n) is the code of the optimum strategy to win the game 'Super Six' for two players if there are n sticks left in the game.

Original entry on oeis.org

0, 0, 1, 7, 63, 1023, 32760, 1048544, 33554304, 1073741312, 34359736320, 1099511619584, 35184370221056, 1125899873681408, 36028796752101376
Offset: 1

Views

Author

Ruediger Jehn, Jun 28 2021

Keywords

Comments

The rules of Super Six for two players are simple. Game equipment consists of a six-sided die, several sticks, and a box whose lid has six holes. The holes numbered 1 through 5 are shallow, and a stick placed in any one of them will stand up in it; hole #6 goes through the lid so that any stick placed in it falls into the box and is out of play. Initially, an even number of sticks are divided evenly between the two players. The goal is to eliminate all one's sticks before the other player does.
The players take turns. On each turn, the player whose turn it is rolls the die and places a stick in the numbered hole that matches the number on the die (e.g., a player who rolls a 4 then places a stick in hole #4). The player may roll and place a stick for each roll as many times as desired until rolling a number that is already filled by a stick. When this occurs, the player must take that stick in hand, and play passes to the opposing player.
The game proceeds with players taking turns and ends when one player has run out of sticks. The only freedom that the players have is the decision of whether to continue rolling the die or not after successfully placing a stick.
If there are 3 sticks left in the game (i.e., held by a player or standing on the lid), there is just one situation in which a player may have to decide whether to stop or to continue: each player has 1 stick, and 1 stick is on the lid; the best strategy is to continue because the probability of winning is 5 out of 6. Hence, the optimum strategy is "1", where "1" stands for keep rolling the die.
If there are 4 sticks left in the game, there are three situations in which a player may have to make a decision to stop or to continue: in the first, each player has 1 stick, and 2 sticks are on the lid (situation 1); in the second, the player whose turn it is has two sticks, the opposing player has 1 stick, and 1 stick is on the lid (situation 2); in the third, the player whose turn it is has one stick, the opposing player has 2 sticks, and 1 stick is on the lid (situation 3). So there are eight strategies, which may be coded in binary as 000, 001, 010, ... 111, where the digits specify whether the player will continue (1) or stop (0).
The sequence of the situations is defined by 1) the number of sticks on the lid and 2) the number of sticks held by player A (both sorted in descending order). For 5 sticks, the sequence is given by 3/1, 2/2, 2/1, 1/3, 1/2, 1/1, where L/H means there are L sticks on the lid and player A is holding H sticks (necessarily, player B has 5-L-H sticks). Strategy "100" means stopping at situations 1 and 2, and continuing at situation 3.
In the paper "Optimum Strategies for the Game Super Six" (see link below) the situations with 1 stick on the lid, H sticks in the hand of player A and 1 stick in the hand of player B are not considered as situations requiring a strategy. This is because these situations can only occur if a player stops rolling the die when there are zero sticks on the lid. While not a logical event in the strict sense, it is of course a possible situation. - Ruediger Jehn, Oct 05 2021

Examples

			a(4) = 7. With 4 sticks left in the game, there are three situations in which a player has a choice. In all situations, the best strategy is to keep rolling the die. Hence, the best strategy is "111", which, when converted to a decimal number, gives 7.
		

Crossrefs

Extensions

a(15) from Ruediger Jehn, Oct 05 2021

A387260 Number of strategies in the game "Risk or Safety" to reach n points.

Original entry on oeis.org

1, 3, 31, 3011, 5755251, 357035589531
Offset: 1

Views

Author

Ruediger Jehn, Aug 24 2025

Keywords

Comments

The game "Risk or Safety" consists of two competing players. A player whose turn it is tosses a coin. If it is heads they earn a point, and they can choose to go for safety, put the point aside in a save box, and give the turn to their opponent. Or they take the risk to continue and toss the coin again. If it is heads again, the number of "open" points increases by one, and they can choose again to continue or stop, converting the "open" points to "saved" points. Whenever it is tails, all the open points are lost, and it is the turn of the other player. Who collects n points first wins.
If a game situation is described by a triple (a, b, c) with a = open points, b = saved points of the player whose turn it is, and c = saved points of the opponent, then the number of possible game situations is n^2(n + 1)/2 = A002411(n). One possibility to calculate the optimal strategy is to examine each triple with a > 0, derive the possible follow-on triples for each possible strategy at this situation, and determine for each stop/continue combination the one with the largest winning probability at this point in the decision tree of all strategies. It is assumed that one optimal strategy exists that both players are playing. For all possible strategies, a system of A002411(n) linear equations needs to be solved. Another approach is to simulate the game iteratively, selecting the solution with the highest winning probability after k turns, and continuing this process until no further improvements are made. Both methods have given the same results, although the matrix approach breaks down for n >= 6, since the inversion of hundreds of billions of 126 X 126 matrices is just not feasible.
The optimal solution for n = 3 is to stop at (1, 0, 0), else always continue. The average game duration is 6 (n = 2), 120/11 (n = 3), 258/17 (n = 4), and 5532/275 (n = 5).

Examples

			a(2) = 3: For n = 2, we have two game situations (1, 0, 0) and (1, 0, 1) where the players need to decide whether to stop or to continue. If the players choose to stop at (1, 0, 0) there are two strategies at (1, 0, 1): stop and continue. However, if the players choose to continue at (1, 0, 0), the position (1, 0, 1) will never be reached, and therefore in total, there exist only 3 strategies, not 4.
		

Crossrefs

A387261 a(n) is the numerator of the winning probability of the starting player to reach n points first in the game "Risk or Safety", assuming optimal play.

Original entry on oeis.org

2, 4, 6, 2236, 1026, 275848876, 649346842, 61550866190068, 2737872156886, 5556238701119487884, 33857036312840796476194, 3393041394611453189295265268, 218370486707916654640780231642, 112630244896738642814653528498087299988, 14364898791782224577113184680141626682
Offset: 1

Views

Author

Ruediger Jehn, Aug 24 2025

Keywords

Comments

The total number of different strategies is given in A387260. See there for more information.

Examples

			a(2) = 4: For n=2, the optimal strategy is never to stop, but always try to get two consecutive heads. The winning probability is 1/4*(1 + (3/4)^2 + (3/4)^4 + ...) = 4/7.
		

Crossrefs

A387262 are the corresponding denominators.

Extensions

More terms from Jinyuan Wang, Aug 29 2025

A387262 a(n) is the denominator of the winning probability of the starting player to reach n points first in the game "Risk or Safety", assuming optimal play.

Original entry on oeis.org

3, 7, 11, 4165, 1925, 521145625, 1231278125, 117192622421875, 5225432428125, 10634368774326171875, 64913928515324560546875, 6519012951936493553466796875, 420117998909827688127861328125, 217038092253876925088545128021240234375, 27711032758513212360715995025634765625
Offset: 1

Views

Author

Ruediger Jehn, Aug 24 2025

Keywords

Comments

For more details see A387260 and A387261.

Examples

			a(2) = 7: For n=2, the optimal strategy is never to stop, but always try to get two consecutive heads. The winning probability is 1/4*(1 + (3/4)^2 + (3/4)^4 + ...) = 4/7.
		

Crossrefs

A387261 are the corresponding numerators.

Extensions

More terms from Jinyuan Wang, Aug 29 2025
Showing 1-5 of 5 results.