Most methods for calculating the feedback connections in a shift register to generate pseudorandom sequences are based on obtaining the feedback characteristic polynomial. This polynomial must be irreducible modulo two, which means that the lower order irreducible polynomials must be known. With other solutions, such as those using cosets or those which use matrixes, the sequence to be generated must be known to determine the feedback connections to be used. In the paper, we establish a method for calculating the linear-feedback connections, in shift registers, to generate maximum-length pseudorandom sequences. The calculation of these feedback connections is independent both of other possible feedback and the sequence to be generated. The resulting algorithm has a short execution time, regardless of the length of the register used. The work establishes a condition on the feedback connections which is necessary and sufficient for a maximum-length sequence to be generated. No previous knowledge about other feedback of lower order or the sequence to be generated is required.