Project Euler/253
From charlesreid1
Problem Statement
Tidying Up
A small child has a "tidying up" routine for his collection of 40 pieces. Starting with all pieces randomly arranged on the floor, he goes through the following process:
He divides the collection into a number of non-empty piles, then re-stacks the piles into a single pile. The child repeats this process until the pieces are in ascending order.
Let E(n) be the expected number of rounds needed to tidy up n pieces using this method, where the pile divisions are chosen uniformly at random.
Find E(40) and give your answer rounded to 6 decimal places.
Flags