Compute the sum of the two smallest positive integers b with the following property: there are at least ten integers 0 \leq n<b such that n^2 and n end in the same digit in base b.
Compute the sum of the two smallest positive integers b with the following property: there are at least ten integers 0 \leq n<b such that n^2 and n end in the same digit in base b.