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.

A370823 a(n) is the numerator of the ratio of winning probabilities P_A/P_B of winning in a 2-player game with a ratio of odds for A and B in a single round of 2:1. To win the game it is necessary to win n rounds in a row.

This page as a plain text file.
%I A370823 #26 Mar 13 2024 09:11:38
%S A370823 2,16,104,128,3872,3328,139904,167936,5038592,2748416,7886848,2392064,
%T A370823 6530342912,39182073856,235092475904,16594763776,8463329656832,
%U A370823 381804347392,304679869743104,6647560798208,10968475319140352,2861341387784192,8401385351544832,5207012459675648
%N A370823 a(n) is the numerator of the ratio of winning probabilities P_A/P_B of winning in a 2-player game with a ratio of odds for A and B in a single round of 2:1. To win the game it is necessary to win n rounds in a row.
%C A370823 Such a game can be implemented, for instance, by rolling a single die per round, with A winning the round if the numbers are 1 to 4 and B winning if the numbers are 5 and 6.
%H A370823 Paolo Xausa, <a href="/A370823/b370823.txt">Table of n, a(n) for n = 1..1000</a>
%H A370823 IBM Research, <a href="https://research.ibm.com/haifa/ponderthis/challenges/February2024.html">A Dice Game</a>, Ponder This Challenge, February 2024.
%F A370823 See the solution page of the "Ponder This" challenge for the formula derived from the Markov matrix representing the rules of the game.
%F A370823 Numerator of 2^(n-1)*(3^n-1)/(3^n-2^n). - _Chai Wah Wu_, Mar 07 2024
%e A370823 a(n)/A370824(n) for n = 1..11: 2/1, 16/5, 104/19, 128/13, 3872/211, 3328/95, 139904/2059, 167936/1261, 5038592/19171, 2748416/5275, 7886848/7613.
%t A370823 Array[Numerator[(3^#-1)/((3/2)^#-1)/2] &, 35] (* _Paolo Xausa_, Mar 13 2024 *)
%o A370823 (PARI) a370823_4(n, A=2/3, B=1/3) = my (an=A^n, bn=B^n); (1-A) * an * (1-bn) / ((1-B) * bn * (1-an));
%o A370823 \\ or by determination of the eigenvalues of the Markov matrix
%o A370823 a370823_4(n, na=2, nb=1) = { if (n==1, na/nb, my (ntot=na+nb, A=na/ntot, B=nb/ntot, M=matrix(2*n+1)); M[1,2]=A; M[1,3]=B; for (rp=1, n-1, my (rb=2*rp+1, ra=rb-1);  M[ra,3]=B; M[rb,2]=A; M[ra,ra+2]=A; M[rb,rb+2]=B); M[2*n,2*n]=M[2*n+1,2*n+1]=1; my (ME=mateigen(M)); ME[1,2]/ME[1,3])};
%o A370823 numerator(a370823_4(n))
%o A370823 (Python)
%o A370823 from math import gcd
%o A370823 def A370823(n): return (a:=3**n-1<<n-1)//gcd(a,3**n-(1<<n)) # _Chai Wah Wu_, Mar 07 2024
%Y A370823 A370824 are the corresponding denominators.
%K A370823 nonn,frac
%O A370823 1,1
%A A370823 _Hugo Pfoertner_, Mar 02 2024