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.

Original entry on oeis.org

2, 16, 104, 128, 3872, 3328, 139904, 167936, 5038592, 2748416, 7886848, 2392064, 6530342912, 39182073856, 235092475904, 16594763776, 8463329656832, 381804347392, 304679869743104, 6647560798208, 10968475319140352, 2861341387784192, 8401385351544832, 5207012459675648
Offset: 1

Views

Author

Hugo Pfoertner, Mar 02 2024

Keywords

Comments

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.

Examples

			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.
		

Crossrefs

A370824 are the corresponding denominators.

Programs

  • Mathematica
    Array[Numerator[(3^#-1)/((3/2)^#-1)/2] &, 35] (* Paolo Xausa, Mar 13 2024 *)
  • 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));
    \\ or by determination of the eigenvalues of the Markov matrix
    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])};
    numerator(a370823_4(n))
    
  • Python
    from math import gcd
    def A370823(n): return (a:=3**n-1<Chai Wah Wu, Mar 07 2024

Formula

See the solution page of the "Ponder This" challenge for the formula derived from the Markov matrix representing the rules of the game.
Numerator of 2^(n-1)*(3^n-1)/(3^n-2^n). - Chai Wah Wu, Mar 07 2024