If each phone generated 500 numbers per day, then TimeIntervalNumber is a number in the range of 1...500. So generate 500 codes using all of the numbers in that range. If any of those 500 codes match one of the codes that you actually saw in the wild, then you were near that person.