The algorithm I used is commented here.
facteurs = First[Transpose[
                    Drop[FactorList[X^24-1],2]]]
                    
    (* List of irreducible factors, minus (X-1).
    The Φn are created from the procedure FactorList
    *)
            
    nbreFacteurs = Length[facteurs]
[Graphics:../Images/expose_gr_95.gif]
[Graphics:../Images/expose_gr_96.gif]

One wishes to partition this list in two subsets, the factors of [Graphics:../Images/expose_gr_97.gif] and [Graphics:../Images/expose_gr_98.gif]. A cool way of doing this is to iterate from 0000…01 to 111…111 in binary digits, the number of digits being the length of the list: from 1 to [Graphics:../Images/expose_gr_99.gif] (half is actually enough, by symmetry).

IntegerDigits[37, 2, nbreFacteurs]
[Graphics:../Images/expose_gr_100.gif]

The 1's will pinpoint the position of the factors of [Graphics:../Images/expose_gr_101.gif] in the list, the 0's pinpoint [Graphics:../Images/expose_gr_102.gif]'s.

First /@ Position[IntegerDigits[37, 2, nbreFacteurs], 1]
[Graphics:../Images/expose_gr_103.gif]
Map[facteurs[[#]]&, %]
[Graphics:../Images/expose_gr_104.gif]

Now we have the first term [Graphics:../Images/expose_gr_105.gif]:

Apply[Times,%]//Expand
[Graphics:../Images/expose_gr_106.gif]

[Graphics:../Images/expose_gr_107.gif]

(X^24-1)/% // Cancel
[Graphics:../Images/expose_gr_108.gif]

Here [Graphics:../Images/expose_gr_109.gif], hence the result is rejected.


Converted by Mathematica      February 8, 2002