base = C.GF(0).setbit(nbits).setbit(0)
for k in xrange(1, nbits, 2):
for cc in combs(range(1, nbits), k):
- p = base + sum(C.GF(0).setbit(c) for c in cc)
+ p = base + sum((C.GF(0).setbit(c) for c in cc), C.GF(0))
if p.irreduciblep(): POLYMAP[nbits] = p; return p
raise ValueError, nbits