Thanks John. I did implement w/ repmat and as expected the loss of speed is huge. Still, I have no other way of doing this problem (finding n-digit numbers in base-n with unique digits and special divisibility properties) above base 13. While the repmat is slow, the vpi is doing its job.

Also, I might suggest for future work an equivalent 'isvpi' function.