|
|
вернуться в форумI think that there is a simple formula that is going to work.... > I think that there is a simple formula that is going to > work.... I know the answer when (n mod 4)=3 The answer is +a^((n+1)/4), -a^((n+1)/4) But I don't know the answer when (n mod 4)=1 an efficient algorithm for this problem requires knowing very much of number theory: Legendre Symbols and other (i've found them on the web). You could search the web for quadratic residues modulo n... if not found, I cand send you "my" source... |
|
|