A theory for calculating the number density distribution of small particles on a flat wall from pressure between the two walls