С целочисленными без циклов можно так:

Код AS3:
/**
* min < max;
* min <= excluded
* min <= result < max
*/
function randomInt( min:int, max:int, excluded:int ) : int
{
var r:int = min + (max - min - 1) * Math.random();
return r + int(r >= excluded);
}
var matches:Array = new Array();
var i:int = 10000;
while (i--)
{
var j:int = randomInt(10, 30, 13);
if (matches[j] === undefined)
matches[j] = 0;
else
matches[j]++;
}
for (i=10; i < 30; i++)
{
trace("[" + i + "]: " + matches[i]);
}

Код:
[10]: 480
[11]: 489
[12]: 521
[13]: undefined
[14]: 513
[15]: 511
[16]: 548
[17]: 525
[18]: 546
[19]: 569
[20]: 523
[21]: 571
[22]: 492
[23]: 550
[24]: 495
[25]: 534
[26]: 544
[27]: 527
[28]: 547
[29]: 496