The algorithm for channel test patterns like 2047 and 2E15-1



I want to learn these patterns for BERT, thing is i'm told by a site
that they are pseudorandom sequences based on an 11 and 15 bit shift
register, respectively. That doesn't explain the actual algorithm
though :S could someone clear it up for me as well as explain what
sequence of bits is used and why? thanks alot in advance :)
oh and is the same algorithm also valid for 2E20-1, 2E23-1 and so on
for 20 and 23 bits?

.