Let m,n be integers such that 0≤n≤m. Let p be a prime number and let m=ar+α1p+…+αnp′ and n=β0+β1p+…+βnp′ be the expansions of m and n in base p, where we thus have 0≤αi<p, 0≤βi<p for 0≤i≤r; suppose that ar=0. Show that (nm)≡0(modp) if βi>ar for at least one index i. If on the other hand, βi≤αi for 0≤i≤r, then
(mn)≡(α0β0)⋯(αrβr)(modp)
(In (Z/pZ)[X] we have (1+X)m=(1+X)α0(1+Xp)α1…(1+Xp′)αr.)