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.
%I A376258 #11 Jul 23 2025 16:06:03 %S A376258 5,4,9,5,0,2,1,7,7,7,6,4,2,0,1,5,4,3,1,4,4,4,5,6,5,4,6,8,7,6,3,8,4,9, %T A376258 4,6,5,2,1,3,7,1,8,6,5,0,2,9,0,0,1,7,2,3,6,7,2,5,1,6,8,2,6,1,3,7,5,2, %U A376258 0,3,0,6,5,1,9,7,7,0,7,7,1,0,7,2,4,0,2,4,8,3,8,0,1,4,2,9,3,6,5,9 %N A376258 Decimal expansion of the probability where a change occurs in the optimal strategy for a coin game where you have to set aside at least one coin every round. %C A376258 You play the following game: you start out with n coins that all have probability p to land heads. You toss all of them and you then need to set aside at least one of them, which will not be tossed again. Now you repeat the process with the remaining coins. This continues (for at most n rounds) until all coins have been set aside. Your goal is to maximize the total number of heads you end up with. As it turns out, there exists a constant p_0 ~ 0.5495021777642 such that for p_0 < p < 1 it is (for large enough n) optimal to set aside exactly one coin every round, unless all coins landed heads. On the other hand, in the case that all but one of the coins show heads, then for p smaller than or equal to p_0 it is optimal (regardless of the value of n) to set aside all n-1 heads and toss the remaining coin again. %H A376258 Wouter van Doorn, <a href="https://arxiv.org/abs/2406.14700">On maximizing the number of heads when you need to set aside at least one coin every round</a>, arXiv:2406.14700 [math.CO], 2024. %e A376258 0.54950217776420154314445654687638494652137186502900172367251682613752030651977... %o A376258 (PARI) \p 125 %o A376258 q = 0.5; r = 0.5; m = 2; %o A376258 {for(a = 1, 120, %o A376258 for(k = 0, 10, %o A376258 p = q + k/10^m; %o A376258 L = 10*m; %o A376258 v = vector(L); %o A376258 v[1] = p; %o A376258 v[2] = -p^3 + 3*p; %o A376258 n = 2; %o A376258 while(v[n] < v[1] + (n-1) && n < L, n=n+1; %o A376258 v[n] = v[n-1] + 1 + p^n*(n-1-v[n-1]) + n*p^(n-1)*(1-p)*max(0, n-2+p-v[n-1]) - (1-p)^n); %o A376258 if(n==L, r = p)); %o A376258 q = r; %o A376258 m = m + 1)} %o A376258 print(p); %K A376258 nonn,cons %O A376258 0,1 %A A376258 _Wouter van Doorn_, Sep 17 2024