Where am I going wrong with my code?
You've got lots of basic syntax error. May be you should start with small example first in order to learn the basic syntax.,
You need ";" to separate statements in M. You can't write
k = 2;
p = 2
While[k < 17,
p = 1
While[GF[17][{k}]^p =!= 1,
p ++
]
If[p == 16,
Print [k]
Break[]
];
k++
]
notice there is no ";" after the p=1
and no ";" after the ]
there., You also need ";" after the Print
.
It is important to know the difference between "," and ";" in Mathematica. I have not tried to run your code, just an observation. Also the GF[17][{k}]^p
looks strange but I never used this function. Have you tried to test this on its own first to make sure you get the syntax correct?