> From what I understand, this is because larger objects have more mass, moving slower when shaked, so as the larger (brazil nuts) don't move as much relative to the smaller ones (peanuts)

That doesn’t make sense to me. If larger objects move slower, don’t they move faster relative to the (accelerating) reference frame of the container?

Also, conventional wisdom has it that shaking (temporarily) creates empty spaces, and smaller objects ‘need’ smaller such spaces to fall down, and thus are more likely to fall down into such a space.

> That doesn’t make sense to me. If larger objects move slower, don’t they move faster relative to the (accelerating) reference frame of the container?

Yes? But so what? The relevant interaction is between the peanuts and the Brazil it's.

> Also, conventional wisdom has it that shaking (temporarily) creates empty spaces, and smaller objects ‘need’ smaller such spaces to fall down, and thus are more likely to fall down into such a space.

Right, but preferentially under the larger Brazil nuts.