Skip to content
/ qr Public

This calculates all of the quadratic residues of any odd-prime powers. Furthermore, this can calculate the number of quadratic residues rapidly.

Notifications You must be signed in to change notification settings

unmummied/qr

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

$$ ^\forall p: \text{odd prime}, \ ^\forall e \in \mathbb{Z_+}, \ \ \begin{eqnarray} \left| \ \mathrm{QR_+} (p) \ \right| &=& \frac{p - 1}{2}\\ \text{if} \ e \in 2\mathbb{Z_+}, \ \left| \ \mathrm{QR_+} (p^e) \ \right| &=& \ p \ \left| \ \mathrm{QR_+}(p^{e - 1}) \ \right| \\ \text{if} \ e \notin 2\mathbb{Z_+}, \ \left| \ \mathrm{QR_+} (p^e) \ \right| &=& \ p \ \left| \ \mathrm{QR_+}(p^{e - 1}) \ \right| \ + \ \lfloor \sqrt{p - 1} \rfloor \ + \ \left| \ \left\{ \ r \in \mathrm{QR_+}(p) \ \middle| \ ^\forall k \in \mathbb{Z_+}, \ k^2 \ne r \ \right\} \ \right| \end{eqnarray}$$

About

This calculates all of the quadratic residues of any odd-prime powers. Furthermore, this can calculate the number of quadratic residues rapidly.

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages