login
Number of winning combinations in the game Icosahedron Bingo after n rolls.
1

%I #31 Sep 11 2024 00:58:28

%S 0,0,48,2592,90720,2586480,65161968,1509658752,32911582080,

%T 685119782160,13755310239888,268267050772512,5109359413086240,

%U 95418907789099440,1752890867129525808,31756472619673447872,568541920959156715200,10075862672718444298320,177012647741302271755728

%N Number of winning combinations in the game Icosahedron Bingo after n rolls.

%C In the game "Icosahedron Bingo" each player picks 9 numbers between 1 and 20 and places them in a 3 X 3 grid. Then an icosahedron showing the numbers from 1 to 20 is rolled and the players cross out the rolled number if this number appears in their grid. The player who first crosses out a row, a column or a diagonal has won, just like in the normal Bingo game.

%C a(n)/20^n is the probability to achieve Bingo with the n-th draw. The maximum probability is reached at the 11th draw and equals 6.72 %. The expectation value of the numbers of draws until Bingo is achieved is 1807/126 = 14.34. The probability to win in a game of two players is 47.7 %, the probability that both players achieve Bingo with the same draw is 4.65 %.

%H Andrew Howroyd, <a href="/A375294/b375294.txt">Table of n, a(n) for n = 1..200</a>

%H <a href="/index/Rec#order_07">Index entries for linear recurrences with constant coefficients</a>, signature (98,-4102,95060,-1317169,10912202,-50046408,98017920).

%F From _Andrew Howroyd_, Aug 11 2024: (Start)

%F a(n) = 6*17^(n-1) + 64*16^(n-1) - 160*15^(n-1) + 24*14^(n-1) + 182*13^(n-1) - 152*12^(n-1) + 36*11^(n-1).

%F G.f.: x^2*48*(1 - 44*x + 700*x^2 - 4887*x^3 + 13520*x^4)/((1 - 11*x)*(1 - 12*x)*(1 - 13*x)*(1 - 14*x)*(1 - 15*x)*(1 - 16*x)*(1 - 17*x)). (End)

%e a(3) = 48: There are 3 rows, 3 columns and 2 diagonals, which gives 8 alignments to achieve Bingo. If the numbers in one alignment are called a, b and c then there are 6 possible permutations: abc, acb, bac, bca, cab and cba. 8 alignments times 6 permutations equals 48.

%p 2*add([18, -76, 91, 12, -80, 32, 3][n]/(1 - (n+10)*x), n=1..7): series(%, x, 20):

%p seq(coeff(%,x,n), n=0..18); # after _Andrew Howroyd_, _Peter Luschny_, Aug 11 2024

%o (Python)

%o row1 = 1+2+4; row2 = 8+16+32; row3 = 64+128+256

%o col1 = 1+8+64; col2 = 2+16+128; col3 = 4+32+256

%o dia1 = 1+16+256; dia2 = 4+16+64

%o n = 9 # number of draws

%o count = [0] * (n+1)

%o def next_draw(my_set, mult, level) -> list[int]:

%o for i in range(9):

%o new_draw = 2 ** i

%o if my_set & new_draw == 0: # a new of my selected 9 numbers is drawn

%o y = my_set + new_draw # and is added to my set

%o if (row1&y == row1 or row2&y == row2 or row3&y == row3

%o or col1&y == col1 or col2&y == col2 or col3&y == col3

%o or dia1&y == dia1 or dia2&y == dia2):

%o count[level] += mult # bingo!

%o elif level < n:

%o next_draw(y, mult, level+1)

%o elif level < n: # a number is drawn that is already in my set

%o next_draw(my_set, mult, level+1)

%o if level < n: # a number is drawn that is not amongst my 9 numbers

%o next_draw(my_set, mult*11, level+1)

%o return count

%o print("Terms:", next_draw(0, 1, 0))

%o (PARI)

%o isfull(b)={for(r=0, 2, if(bitand(b>>(r*3),7)==7 || bitand(b>>r,73)==73, return(1))); bitand(b,273) == 273 || bitand(b,84)==84}

%o cof()={my(v=vector(9)); for(b=1, 511, if(isfull(b), v[hammingweight(b)]++)); v}

%o seq(n)={my(c=cof(), v=vector(n, n, sum(k=3, #c, sum(j=k, n, 11^(n-j)*binomial(n,j)*c[k]*k!*stirling(j,k,2))))); vector(#v,n,v[n]-if(n>1,20*v[n-1]))} \\ _Andrew Howroyd_, Aug 11 2024

%o (PARI) a(n) = {n--; 6*17^n + 64*16^n - 160*15^n + 24*14^n + 182*13^n - 152*12^n + 36*11^n} \\ _Andrew Howroyd_, Aug 11 2024

%K nonn,easy

%O 1,3

%A _Ruediger Jehn_, Aug 10 2024

%E a(11) onwards from _Andrew Howroyd_, Aug 11 2024