Consider n nodes competing for access on a channel using slotted ALOHA. Our aim is to maximize the probability Φ that the first message within s slots does not collide. We derive an expression for the transmit probabilities in each slot, maximizing Φ. As opposed to previous work, the expression is non-recursive, thus easier to calculate and more convenient for practical implementations. Furthermore, we address the problem that, in practical applications, the number of competing nodes n is likely to be unknown and has to be estimated by each node. We study the sensitivity of channel access scheme with respect to deviations from the actual n via simulations. It is shown that overestimation of n is a better strategy than underestimation.