How is the next forger decided in Nxt?
Which account is entitled to forge the next block depends on several things.

The last block added to the blockchain includes a 32-byte "generation signature" (actually a hash). This signature is concatenated with the public key of each account attempting to forge the next block, then sha256 hashed to produce a new generation signature to be included in the next block, the block currently being forged. The 8 most significant bytes of the new signature are combined into a 64-bit integer in reverse order (little endian) to determine the "hit" value of each account.

These hit values are effectively random and can't be known before the latest block is added to the blockchain, but after that they are known throughout the network. Any account receiving a newly forged block from the network can verify that the generating (forging) account is eligible to forge, because it knows the last block's generation signature and the public key of the forger, both of which are included in the new block, and thus can compute the hit value for any account.

Because the hit value is effectively random, every account with a non-zero EffectiveBalance has a chance to forge. A low hit value is desirable, because then even an account with a low balance can get a hit. The formula for getting a hit is

hit &lt; BaseTarget * EffectiveBalance * TimeSinceLastBlock

The BaseTarget is dynamically adjusted with each new block so that a hit occurs somewhere on the network about once per minute. A hit will eventually occur even if the hit value is by chance very high, because it becomes easier to get a hit with each passing second because of the TimeSinceLastBlock (in seconds) term.