Published online by Cambridge University Press: 26 February 2010
Let A⊆ℕ, let p be a prime and w a word over ℤ pℤ ending with a non-zero digit. The relationship is investigated between the density of A. the length of w and the density of the set of numbers n for which the base p expansion of ends with w0n for some a ∈ A. Also considered is the analogous problem on Pascal's triangle. This leads in particular to answering a question of Granville and Zhu [7] regarding the asymptotic frequency of sums of 3 squares in Pascal's triangle.