Dear all, The code below works for finding  for B each n 
D=[]
F=[]
B=[]
Z=[]
for n in range(1,10,2): 
    Z.append(Integers(n)(2).multiplicative_order())
for r in Z:
    if r%2!=0:
        B.append(2^r-1)
    else:
        M=r/2
        if r%n==-1:
            B.append(n*(2^(r/2)-1))
        else:
            B.append(2^r-1) 
for b in B:
    divisors(b)       
The part  below is to create the cyclotomic polynomial for all divisors of 
n an find all irreducible polynomials ove F2 by factor.
D=[divisors(b) for b in B]
F.<x>=GF(2)[]
G=[]
K=[]
P=[]
for h in range(1,10,2):
    for t in divisors(h):
        G.append(F.cyclotomic_polynomial(t))
for g in G:
    K.append(g.factor())
    P.append((K[i][j][0] for i in range(len(K)) for j in range(len(K[i]))))
for b in D:
    for f in P:
        F.<j>=F.quotient(f)
        if (j+1)^b==1:
            print(b)
            break
*Question*: I want to use each factor of polynomial correspond to n to  
find the divisors of each element in B which  if it  is a power of  x +1 
gives one....But i fail to because gives error when i sign ech factor as a 
quotient. And it gives error 

unable to coerce <type 'generator'> to an integer

  

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To post to this group, send email to sage-support@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.

Reply via email to