Hitting k primes by dice rolls

By Noga Alon, Yaakov Malinovsky, Lucy Martinez, and Doron Zeilberger


.pdf    .tex   

Written: Feb. 12, 2024


In this paper [arxiv version] by Noga Alon and Yaakov Malinovsky, extended in this paper, by Lucy Martinez and Doron Zeilberger, found (and proved) the expected number of rolls it takes, rolling a standard die (and more general dice) until the running total is a prime (and other interesting kinds of numbers) for the FIRST time. But how long would it take (on average) until you see a prime k times?, for any k. We use computation to give exact values (up to many decimal places) for these numbers for k from 1 to 30 (and for k=40,60,80,100) and use human ingenuity to prove that it is asymptotiaclly k*ln(k)*(1+o(1))


Added March 23, 2025: Read this nice post .

Added May 19, 2025: Read the slides of Thotsaporn Aek Thanatipanoda's great talk at the MUIC mathematics seminar (May 21, 2025) (see abstract).


Maple package


Sample Input and Output for PRIMESk.txt


Plots of the Probability Density Functions (pdf) of the Random Variable "Reaching a prime for the k-th time" by rolling a fair die for k=20,40,60,80,100


Articles of Doron Zeilberger

Noga Alon's Home Page

Yaakov Malinovsky's Home Page

Lucy Martinez's Home Page

Doron Zeilberger's Home Page