Given two upperbounds $K$ and $X$, and some positive integer $k : 1 \le k \le K$, is there a way to determine for how many values of $x: 1\le x \le X)$ that $x^2\equiv 0\pmod k$?
Asked
Active
Viewed 62 times
1 Answers
1
Suppose $k$ has prime factorization ${p_1}^{j_1}{p_2}^{j_2}\cdots {p_n}^{j_n}$, with $p_i$ prime and distinct, and $j_i$ positive integers. We say that $k$ is square-free if each $j_i$ is $1$.
The equation $x^2 \equiv 0 \pmod k$ will have a unique solution modulo $k$ if and only if $k$ is square free.
As for the general case: $x^2 \equiv 0 \pmod k$ will have $$ \prod_{i=1}^n p_i^\left\lfloor \frac{j_i}{2} \right\rfloor $$ solutions modulo $k$.
Ben Grossmann
- 225,327