The Riddle this week is rather straightforward to explain: stacking identical objects (bars of length and mass two, say) on top of one another so that the center of each new bar is uniformly distributed along the previous bar, what is the distribution of the number of bars when the stack collapses? If I am not confused, the stack collapses the first time the centre of gravity of an upper stack leaves the interval represented by the bar just below. Namely
when the xi are the bar centres, or equivalently
where the ε_i‘s are U(-1,1). Which is straightforward to code in R by looking at means of cumulated sums.