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-4 of 4 results.

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

A370825 a(n) is the numerator of the ratio of winning probabilities in a game similar to A370823, but with a draw and single round odds A:B:draw of 3:2:1.

Original entry on oeis.org

3, 2, 39, 4, 363, 26, 3279, 328, 29523, 1342, 11553, 292, 2391483, 1195742, 21523359, 126608, 193710243, 728234, 1743392199, 3169804, 15690529803, 341098474, 3004569537, 155181064, 1270932914163, 635466457082, 11438396227479, 39442745612, 102945566047323, 21563796826
Offset: 1

Views

Author

Hugo Pfoertner, Mar 08 2024

Keywords

Comments

Such a game can be implemented, for instance, by rolling a single die per round, with A winning the round on numbers 1, 2, 3, B winning on 4, 5 and a draw on 6. To win the game it is necessary to win n rounds in a row. The draw also terminates winning streaks of A or B.

Examples

			a(n)/A370826(n) for n=1..14: 3/2, 2, 39/14, 4, 363/62, 26/3, 3279/254, 328/17, 29523/1022, 1342/31, 11553/178, 292/3, 2391483/16382, 1195742/5461.
		

Crossrefs

A370826 are the corresponding denominators.
A052548(n+1)/3 is the ratio of winning probabilities when the odds are 2:1:1.
Cf. A370823, A370824 for odds 2:1:0.

Programs

  • Mathematica
    Array[Numerator[3/4*(3^#-1)/(2^#-1)] &, 50] (* Paolo Xausa, Mar 11 2024 *)
  • PARI
    a370825(n) = numerator((3/4) * (3^n - 1) / (2^n - 1));
    
  • Python
    from math import gcd
    def A370825(n): return (a:=3**(n+1)-3>>1)//gcd(a,(1<Chai Wah Wu, Mar 10 2024

Formula

a(n)/A370826(n) = (3/4) * (3^n - 1) / (2^n - 1).

A370826 a(n) are the denominators corresponding to A370825(n).

Original entry on oeis.org

2, 1, 14, 1, 62, 3, 254, 17, 1022, 31, 178, 3, 16382, 5461, 65534, 257, 262142, 657, 1048574, 1271, 4194302, 60787, 356962, 12291, 67108862, 22369621, 268435454, 617093, 1073741822, 149943, 4294967294, 16843009, 746950834, 5726623061, 967879954, 981, 274877906942
Offset: 1

Views

Author

Hugo Pfoertner, Mar 08 2024

Keywords

Comments

See A370825 for more information.

Examples

			A370825(n)/a(n) for n=1..14: 3/2, 2, 39/14, 4, 363/62, 26/3, 3279/254, 328/17, 29523/1022, 1342/31, 11553/178, 292/3, 2391483/16382, 1195742/5461.
		

Crossrefs

A370825 are the corresponding numerators.

Programs

  • Mathematica
    Array[Denominator[3/4*(3^#-1)/(2^#-1)] &, 50] (* Paolo Xausa, Mar 11 2024 *)
  • PARI
    a370826(n) = denominator((3/4) * (3^n - 1) / (2^n - 1));
    
  • Python
    from math import gcd
    def A370826(n): return (a:=(1<>1) # Chai Wah Wu, Mar 10 2024

Formula

A370825(n)/a(n) = (3/4) * (3^n - 1) / (2^n - 1).

A370827 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 3:2. To win the game it is necessary to win n rounds in a row.

Original entry on oeis.org

3, 63, 1053, 16443, 250533, 28431, 56859813, 853737003, 12811093893, 17472421953, 2883131020773, 25013333547, 648727335888453, 9730949220408843, 145964473398624933, 128792265384372219, 32842036136344638213, 3703989419737954191, 7389459197057088616293, 10076535434903231752353
Offset: 1

Views

Author

Hugo Pfoertner, Mar 09 2024

Keywords

Comments

If you play the game with odds of 3:2 with one dice, you can decide what happens to the unused number. In the present sequence, this number is ignored without effect. However, if one defines the occurrence of the 6th number as a draw, which interrupts consecutive wins by both players, then the sequence pair A370825/A370826 results. The addition of a draw increases the odds ratio in favor of the player who has the higher chance of winning a single round. The relative advantage is small with 2 games to be won, i.e., 2/(63/32)-1 = 1/63, with 3 rounds 1/27, with 4 rounds 965/16443, but increases with a higher number of consecutive rounds to be won, and reaches asymptotically 1/8.

Examples

			a(n)/A370828(n) for n = 1..8: 3/2, 63/32, 1053/392, 16443/4352, 250533/46112, 28431/3584, 56859813/4860032, 853737003/49160192.
		

Crossrefs

A370828 are the corresponding denominators.

Programs

  • PARI
    a370827(n) = numerator((2/3) * (3/5)^n * ((5/2)^n - 1) / (1 - (3/5)^n))
    
  • Python
    from math import gcd
    def A370827(n): return (a:=3**(n-1)*(5**n-(1<Chai Wah Wu, Mar 12 2024

Formula

a(n)/A370828(n) = (2/3) * (3/5)^n * ((5/2)^n - 1) / (1 - (3/5)^n).
Showing 1-4 of 4 results.