What you need is a "shuffle". Try this (written in pseudocode)
initialise an array with the numbers, so arr[i] = i for i = 0 to (13700 or whatever)
repeat until bored (100,000 is probably more than enough)
let q be a random number between 0 and (13700 or whatever)
swap arr[0] and arr[q]
Now you have the array you want. This is a very simple but effective technique, and it won't take forever to run.
Peter