I don't really understand the specifics of it, but the string of clustered numbers definitely exists, and is a known "bug" of the NWN system. A DM who knew something about coding explained to me a long time ago on another server. it has something to do with each cell having a preset number sequence embedded in it as you enter it. So NWNs random number generator isn't random at all. It follows a genuine formula that just has the appearance of randomness,** and I think each number generated is somehow tied to the one immediately before it.** That's where the weird strings of clusters can come from. The upside is it can also work in the players favor. I have seen numerous times over the years strings of 4 and 5 crits with a weapon that has a 10% or 20% chance to score one.

Interesting. If this is highlighted quote is accurate (and I don't know how NWN is programmed), then the game engine uses something similar to what is called the "middle-squares" method of generating a key number. By way of background, a mathematical "random" number generator, as people have noted, does not actually generate "random" numbers. Think of it as the equivalent of a cypher machine (for making and breaking secret codes, like ENIGMA or PURPLE in WWII). It uses a numeric seed value as its starting "key", and from this key it uses a mathematical algorithm to generate a sequence of numbers that appear to be random, but in fact follow a predictable mathematical pattern if you know the key. Any sequence that is generated from the same key value will be identical. Thus, if you know the key value, you can predict the pattern if you have the algorithm. This is how code breakers break down enemy cyphers.

This type of "random" number generator in a computer game like NWN has its algorithm fixed, but the key (seed value) can be changed, resulting in different strings of numbers. Thus, the critical element in making a string of numbers appear to be as random is being able to generate a wide variety of starting seed values/keys.

John Von Neumann developed a simple way to quickly generate random-ish numbers for creating keys (at least simple for a computer) called the "middle squares" method -- to generate a sequence of 4-digit numbers (for example), you start with a 4-digit number which is then squared, producing an 8-digit number. The middle 4 digits of the result would be the next number in the sequence. This process is then repeated, squaring this new 4-digit number to generate a new number and so on. Thus, each value is predicated on the values before it. This process creates the "random" 4-digit seed value for the computer to plug into its algorithm. For simple game purposes, this process would generate a sufficiently large number of keys that people would not necessarily notice if the same key was used later on.

It is not the most sophisticated way to create a cypher, but it works for something as simple as a game like NWN. However, these types of generators do produce odd quirks if the length of the numbers used is too short, or has zeros at the beginning of the number, or other wonky things. The trick is to develop a way to generate these random-ish numbers quickly, so that the computer doesn't slow down to a crawl -- the more sophisticated the method used, the more computing power it takes.

This doesn't explain why you see repeats in sequences in any given series, but it is an interesting insight into the game engine. At least I thought it was interesting. But then again, I am weird about puzzles and numbers.