OFFSET
1,3
COMMENTS
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.
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 %.
LINKS
Andrew Howroyd, Table of n, a(n) for n = 1..200
Index entries for linear recurrences with constant coefficients, signature (98,-4102,95060,-1317169,10912202,-50046408,98017920).
FORMULA
From Andrew Howroyd, Aug 11 2024: (Start)
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).
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)
EXAMPLE
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.
MAPLE
2*add([18, -76, 91, 12, -80, 32, 3][n]/(1 - (n+10)*x), n=1..7): series(%, x, 20):
seq(coeff(%, x, n), n=0..18); # after Andrew Howroyd, Peter Luschny, Aug 11 2024
PROG
(Python)
row1 = 1+2+4; row2 = 8+16+32; row3 = 64+128+256
col1 = 1+8+64; col2 = 2+16+128; col3 = 4+32+256
dia1 = 1+16+256; dia2 = 4+16+64
n = 9 # number of draws
count = [0] * (n+1)
def next_draw(my_set, mult, level) -> list[int]:
for i in range(9):
new_draw = 2 ** i
if my_set & new_draw == 0: # a new of my selected 9 numbers is drawn
y = my_set + new_draw # and is added to my set
if (row1&y == row1 or row2&y == row2 or row3&y == row3
or col1&y == col1 or col2&y == col2 or col3&y == col3
or dia1&y == dia1 or dia2&y == dia2):
count[level] += mult # bingo!
elif level < n:
next_draw(y, mult, level+1)
elif level < n: # a number is drawn that is already in my set
next_draw(my_set, mult, level+1)
if level < n: # a number is drawn that is not amongst my 9 numbers
next_draw(my_set, mult*11, level+1)
return count
print("Terms:", next_draw(0, 1, 0))
(PARI)
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}
cof()={my(v=vector(9)); for(b=1, 511, if(isfull(b), v[hammingweight(b)]++)); v}
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
(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
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Ruediger Jehn, Aug 10 2024
EXTENSIONS
a(11) onwards from Andrew Howroyd, Aug 11 2024
STATUS
approved