MathGroup Archive 2006

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: too many special linear matrices


Andrzej Kozlowski wrote:

>The code below will produce the list of elements of SL[n,p] (as long  
>as n and p are not too large):
>
>SL[n_, p_] := Module[{vars =
>    Table[Unique[
>     a], {n^2}], iters, mat}, iters = Map[{#, 0, p - 1} &, vars]; mat =
>        Partition[vars, n]; Reap[
>     Do[If[Det[mat,
>       Modulus -> p] == 1, Sow[mat], Continue[]], Evaluate[Sequence @@
>       iters]]][[2, 1]]]
>
>
>For n=2 it gives the lengths:
>
>
>Table[Length[SL[2,Prime[i]]],{i,1,7}]
>
>
>{6,24,120,336,1320,2184,4896}
>
>which agree with the formula I sent earlier:
>
>In[16]:=
>Table[f[2,Prime[i]],{i,1,7}]
>
>Out[16]=
>{6,24,120,336,1320,2184,4896}
>
>Andrzej Kozlowski
>
>
>  
>
Andrzej Kozlowski,
You give the correct anwers in this post, but
your code doesn't run in my 5.1 version.
Roger Bagula


  • Prev by Date: Re: Several functions in a single 2D-plot
  • Next by Date: Re: calculate Recurrence Equations
  • Previous by thread: Re: too many special linear matrices
  • Next by thread: Re: Re: too many special linear matrices