1. Introduction
Let
$\mathbb {Z}$
and
$\mathbb {Z}^+$
stand for the set of integers and the set of positive integers, respectively. For any
$n\in \mathbb {Z}^+$
, we set
$\mathbb {Z}_n\!=\!\{0, 1, \ldots , n-1\}$
to be the ring of residue classes modulo n. Let
$\mathbb {Z}_n^*=\{s\in \mathbb {Z}_n: \gcd (s, n)=1\}$
be the group of the units in
$\mathbb {Z}_n$
. Throughout this paper, let k be an integer with
$k\ge 2$
. In 1925, Rademacher [Reference Rademacher8] asked for an explicit formula for the number
$N(k,c,n)$
of solutions
$(x_1,\ldots ,x_k)\in (\mathbb {Z}_n^*)^{k}$
of the linear congruence
In 1926, Brauer [Reference Brauer4] solved this problem by showing that
$$ \begin{align} N(k,c,n)=\frac{\varphi^k(n)}{n}\prod_{p|n,\,p|c}\bigg(1-\frac{(-1)^{k-1}} {(p-1)^{{k-1}}}\bigg) \prod_{p|n,\,p\nmid c}\bigg(1-\frac{(-1)^k}{(p-1)^{k}}\bigg), \end{align} $$
where
$\varphi (n)$
is Euler’s totient function and the products are taken over all prime divisors p of n. In 2009, Sander [Reference Sander9] gave a new proof of the formula for
$N(2,c,n)$
by using the multiplicativity of
$N(2,c,n)$
with respect to n.
The concept of exceptional units was introduced by Nagell [Reference Nagell7] in 1969; he introduced it to solve certain cubic Diophantine equations. For any commutative ring R with the identity element
$1_R$
, let
$R^*$
denote the multiplicative group of units in R. An element
$a\in R$
is said to be an exceptional unit if both
$a\in R^*$
and
$1_R-a\in R^*$
. Many types of Diophantine equations including Thue equations [Reference Tzanakis and de Weger16], Thue–Mahler equations [Reference Tzanakis and de Weger17], discriminant-form equations [Reference Smart13] and others have been studied by means of exceptional units (for more references, see [Reference Louboutin6]). On the other hand, with the help of exceptional units, Lenstra [Reference Lenstra5] introduced a new method to find Euclidean number fields. Exceptional units also have connections with cyclic resultants [Reference Stewart14,Reference Stewart15] and Lehmer’s conjecture related to Mahler measure [Reference Silverman11, Reference Silverman12].
Following Sander’s notation in [Reference Sander10], we use the coinage exunit to stand for exceptional unit. As usual, for any integer m and prime number p, we let
$\nu _p(m)$
stand for the p-adic valuation of m, that is,
$\nu _p(m)$
is the unique nonnegative integer r such that
$p^r\mid m$
and
$p^{r+1}\nmid m$
. We denote by
$\omega (m):=\sum _{p\ {\mathrm{prime,}} p|m}1$
the number of distinct prime divisors of m. Yang and Zhao [Reference Yang and Zhao18] extended Sander’s result [Reference Sander10] by showing that the number of ways to represent each element of
$\mathbb {Z}_n$
as the sum of k exceptional units is given by
$$ \begin{align*}(-1)^{k\omega(n)}\prod_{p| n}p^{k\nu_p(n)-\nu_p(n)-k} \bigg(p\sum_{\substack{ j=0\\ j\equiv c\!\! \pmod p}}^k\binom{k}{j}+(2-p)^k-2^k\bigg). \end{align*} $$
(This corrects an error in the formula in [Reference Yang and Zhao18, Theorem 1], where the sign factor
$(-1)^k$
should read
$(-1)^{k\omega (n)}$
.)
We can easily observe that for any
$a\in \mathbb {Z}^+$
,
$a\pmod n$
is an exunit in
$\mathbb {Z}_n$
if and only if
$\gcd (a(1-a),n)=1$
. In other words,
$a\pmod n$
is an exunit in
$\mathbb {Z}_n$
if and only if
$\gcd (f(a), n)=1$
with
$f(x)=x(1-x)$
. This observation naturally motivates the concept of f-exunit as follows. Let
$n\ge 1$
be an integer and let
$f(x)\in \mathbb {Z}[x]$
. An integer a is an f-exunit in the ring
$\mathbb {Z}_n$
if
$\gcd (f(a), n)=1$
(see [Reference Anand and Roy1]). We denote by
$E_{f}(n)$
the set of all f-exunits in the ring
$\mathbb {Z}_n$
. It is clear that
Throughout, we assume that f is a nonconstant polynomial and c is an integer. For any finite set S, we denote by
$\sharp S$
the number of the elements in S. We set
${\mathcal N}_{k,f,c}(n)$
to be the number of solutions
$(x_1,\ldots ,x_k)$
of the congruence
$x_1+\cdots +x_k\equiv c\pmod n$
with
$x_1,\ldots ,x_k\in E_{f}(n)$
, that is,
$$ \begin{align*}{\mathcal N}_{k,f,c}(n):=\sharp\{(x_1,\ldots,x_k)\in E_{f}(n)^k : x_1+\cdots+x_k\equiv c \pmod n\}. \end{align*} $$
For any given prime number p, associated with
$f(x)\in \mathbb {Z}[x]$
and
$c\in \mathbb {Z}$
, we define the nonnegative number
${\mathcal M}_{k,f,c}(p)$
by
$$ \begin{align} {\mathcal M}_{k,f,c}(p):= \sharp\bigg\{ ( x_1 ,\ldots, x_{ k - 1 })\in\mathbb Z_p^{k - 1}: f(x_1) \cdots f( x_{ k - 1 })f\bigg(c-\sum_{i=1}^{k-1}x_i\bigg)\equiv 0 \pmod p\bigg\}. \end{align} $$
In [Reference Anand and Roy2], Anand et al. presented a formula for
${\mathcal N}_{2,f,c}(n)$
which also extends Sander’s theorem [Reference Sander10]. However, it still remains open to give an explicit formula for
${\mathcal N}_{k,f,c}(n)$
when
$k\ge 3$
.
In this paper, we introduce a new method to investigate the number
${\mathcal N}_{k,f,c}(n)$
. Actually, we make use of the well-known principle of cross-classification [Reference Apostol3] to derive an explicit formula of
${\mathcal N}_{k,f,c}(n)$
for all positive integers n. The first main result of this paper can be stated as follows.
Theorem 1.1. Let
$f(x)\in \mathbb {Z}[x]$
be a nonconstant polynomial and let c be an integer. Then
${\mathcal N}_{k,f,c}$
is a multiplicative function and, for any positive integer n,
$$ \begin{align*}{\mathcal N}_{k,f,c}(n)=n^{k-1}\prod_{p| n} \bigg(1-\frac{{\mathcal M}_{k,f,c}(p)}{p^{k-1}}\bigg). \end{align*} $$
Theorem 1.1 reduces to the main result of [Reference Anand and Roy2] (Theorem 2) if
$k=2$
. For a linear polynomial
$f(x)$
, we have the second main result of this paper generalising (1.1).
Theorem 1.2. Let c and n be integers with
$n\ge 1$
. Let
$f(x)=ax+b\in \mathbb {Z}[x]$
with
$\gcd (a,n)=1$
. Then
$$ \begin{align*}{\mathcal N}_{k,f,c}(n)=n^{k-1}\prod_{p|n} \frac{(p-1)^k+(-1)^k\delta_p}{p^k},\end{align*} $$
where
$$ \begin{align} \delta_p:= \begin{cases} p-1 \quad&\mbox{if}\ p\mid (ac+kb),\\ -1 \quad&\mbox{if}\ p\nmid(ac+kb). \end{cases} \end{align} $$
For a quadratic polynomial
$f(x)$
, one can deduce from Theorem 1.1 the third main result of this paper, which extends the Yang–Zhao theorem [Reference Yang and Zhao18].
Theorem 1.3. Let c and n be integers with
$n\ge 1$
. Let
$f(x)=(a_1x-a_2)(b_1x-b_2)$
with
$a_1,a_2,b_1,b_2\in \mathbb Z$
and
$\gcd (a_1,n)=\gcd (b_1,n)=\gcd (a_1b_2-a_2b_1, n)=1$
. Then
$$ \begin{align*}{\mathcal N}_{k,f,c}(n)\!=\!(-1)^{k\omega(n)}\prod_{p| n} p^{k\nu_p(n)-\nu_p(n)-k}\bigg(p\sum_{\substack{j=0\\ (a_2b_1-a_1b_2)j\, \equiv\, a_1b_1c-a_1b_2k\!\!\pmod p}}^k\binom{k}{j}\!+\!(2-p)^k-2^k\bigg). \end{align*} $$
This paper is organised as follows. In Section 2 we present several lemmas that are needed in the proofs of Theorems 1.1 and 1.3. Section 3 is devoted to the proof of Theorem 1.1 and Sections 4 and 5 to the proofs of Theorems 1.2 and 1.3, respectively.
2. Preliminary lemmas
In this section, we supply several lemmas that will be needed in the proofs of Theorems 1.1 and 1.3. We begin with the celebrated principle of cross-classification.
Lemma 2.1 (Principle of cross-classification; [Reference Apostol3, Theorem 5.31]).
Let R be any given finite set. For a subset T of R, we denote by
$\bar T=R\setminus T$
the set of those elements of R which are not in T. If
$R_1,\ldots ,R_{m-1}$
and
$R_m$
are m arbitrary given distinct subsets of R, then
$$ \begin{align*}\sharp\bigcap_{i=1}^m\bar R_i=\sharp R+\sum_{t=1}^m(-1)^t \sum_{1\leq i_1<\cdots<i_t\leq m}\sharp\bigcap_{j=1}^tR_{i_j}.\end{align*} $$
The next result can be proved by using the Chinese remainder theorem.
Lemma 2.2 [Reference Apostol3, Theorem 5.28].
Let
$r\in \mathbb Z^+$
and
$g(x_1,\ldots ,x_r)\in \mathbb {Z} [x_1,\ldots ,x_r]$
and let
$m_1,\ldots , m_k$
be pairwise relatively prime positive integers. For any integer i with
$1\le i\le k$
, let
$N_i$
be the number of zeros of
$g(x_1,\ldots ,x_r)\equiv 0\pmod {m_i}$
and let N denote the number of zeros of
$g(x_1,\ldots ,x_r)\equiv 0 \pmod {\prod _{i=1}^k m_i}$
. Then
$N=\prod _{i=1}^k N_i$
.
Lemma 2.3. Let
$n,r, m\in \mathbb Z^+$
with
$m \mid n$
and let
$g(x_1,\ldots ,x_r)\in \mathbb Z[x_1,\ldots ,x_r]$
. Then
$$ \begin{align*} &\sharp\{(x_1,\ldots,x_r)\in \mathbb Z_n^r: g(x_1,\ldots,x_r)\equiv 0 \pmod m\}\\ &\quad =\bigg(\frac{n}{m}\bigg)^r\sharp\{(x_1,\ldots,x_r)\in \mathbb Z_m^r: g(x_1,\ldots,x_r)\equiv 0 \pmod m\}. \end{align*} $$
Proof. Let
$(x_1, \ldots , x_r)$
be any r-tuple of integers with all
$x_i$
in the set
$\{0,1,\ldots ,m-1\}$
such that
Then, for arbitrary integers
$i_1,\ldots ,i_r$
with
$0\leq i_1,\ldots ,i_r < {n}/{m}$
,
and
Every such
$i_j \ (1\le j\le r)$
has
${n}/{m}$
choices. So, one can immediately deduce the assertion in the lemma.
In the following, let p be a prime number. For any integer a coprime to p, let
$a^{-1}$
stand for an integer satisfying
$aa^{-1}\equiv 1\pmod p$
. For any
$a_1, a_2, b_1, b_2\in \mathbb {Z}$
with
$\gcd (a_1a_2,p)=1$
, let
$f_1(x)=(a_1x-b_1)(a_2x-b_2)$
and
$f_2(x)=(x-a_1^{-1}b_1)(x-a_2^{-1}b_2)$
. Then
$f_1(t)=a_1a_2f_2(t)$
for any integer t. It follows that
So, for our purpose, if
$f(x)$
is a reducible quadratic polynomial with no multiple zeros, then we can assume that
$f(x)=(x-a)(x-b)\in \mathbb Z[x]$
. Let us now compute
${\mathcal M}_{k,f,c}(p)$
.
Lemma 2.4. Let
$a,b\in \mathbb Z_p$
with
$a\not =b$
and let
$f(x)=(x-a)(x-b)$
. Then
$$ \begin{align*} &{\mathcal M}_{k,f,c}(p)=p^{k-1}-\frac{(-1)^k}{p} \bigg(p\sum_{\substack{j=0\\ (a-b)j\equiv c-bk \!\pmod p}}^k\binom{k}{j}+(2-p)^k-2^k\bigg). \end{align*} $$
Proof. Since
$f(x)=(x-a)(x-b)\in \mathbb {Z}[x]$
,
$$ \begin{align*} &{\mathcal M}_{k,f,c}(p) =\sharp\bigg\{(x_1,\ldots,x_{k-1})\in \mathbb Z_p^{k-1} : f(x_1)\cdots f(x_{k-1}) f\bigg(c-\sum_{i=1}^{k-1}x_i\bigg)\equiv 0 \pmod p\bigg\}\\ &\quad =\sharp\mathbb Z_p^{k - 1}-\sharp\bigg\{(x_1,\ldots,x_{k - 1}) \in\mathbb Z_p^{k-1}: f(x_1)\cdots f(x_{k - 1})f\bigg(c -\sum_{i=1}^{k-1}x_i\bigg) \not\equiv 0 \pmod p\bigg\}\\ &\quad =p^{k-1}-\sharp\bigg\{(x_1, \ldots, x_{k - 1 })\in \mathbb Z_p^{k-1}: \\ &\qquad\qquad\quad \bigg(c-\sum_{i=1}^{k-1}x_i-a\bigg)\bigg(c-\sum_{i=1}^{ k - 1 }x_i - b\bigg) \prod_{i=1}^{k - 1}(x_i-a)(x_i - b)\not\equiv 0 \pmod p\bigg\}\\ &\quad =p^{k-1}-\sharp\bigg\{(x_1,\ldots,x_{k})\in \big(\mathbb Z_p\backslash \{a,b\}\big)^k: \sum_{i=1}^{k}x_i\equiv c\pmod p\bigg\}. \end{align*} $$
Moreover,
$$ \begin{align*} &\sharp\bigg\{(x_1,\ldots,x_{k})\in \big(\mathbb Z_p\backslash\{a,b\}\big)^k: \sum_{i=1}^{k}x_i\equiv c\pmod p\bigg\}\\ &\quad = \frac{1}{p}\sum _{y=0}^{p-1}\sum _{(x_1,\ldots,x_k)\in(\mathbb Z_p\backslash\{a,b\})^k}\exp\bigg(\frac{2\pi { i}y(x_1+\cdots+x_k-c)}{p}\bigg)\\ &\quad = \frac{1}{p}\sum _{y=0}^{p-1}\bigg(\sum _{x\in\mathbb Z_p\backslash\{a,b\}}\exp\bigg(\frac{2\pi { i}xy}{p}\bigg)\bigg)^k \exp\bigg(\frac{2\pi {\textrm{i}}(-cy)}{p}\bigg)\\ &\quad =\frac{1}{p}\bigg(\sum _{y=1}^{p-1}\bigg(-\exp\bigg(\frac{2\pi { i}ay}{p}\bigg)-\exp\bigg(\frac{2\pi { i}b y}{p}\bigg)\bigg)^k \exp\bigg(\frac{2\pi { i}(-cy)}{p}\bigg)+(p-2)^k\bigg)\\ &\quad =\frac{1}{p}\bigg((-1)^k\sum _{y=1}^{p-1}\bigg(\sum_{j=0}^{k}\binom{k}{j}\exp\bigg(\frac{2\pi { i}y(ja + (k-j)b)}{p} \bigg)\bigg) \exp\bigg(\frac{2\pi { i}(-cy)}{p}\bigg)+(p-2)^k\bigg)\\ &\quad =\frac{1}{p}\bigg((-1)^k\sum _{j=0}^{k}\binom{k}{j}\sum_{y=1}^{p-1} \exp\bigg(\frac{2\pi { i}y(aj+bk-bj-c)}{p}\bigg)+(p-2)^k\bigg) \\ &\quad = \frac{(-1)^k}{p} \bigg(\sum_{\substack{j=0\\ (a-b)j\equiv c-bk \pmod p}}^k \binom{k}{j}(p-1) -\sum_{\substack{j=0\\ (a-b)j\not\equiv c-bk \!\pmod p}}^{k}\binom{k}{j}+(2-p)^k \bigg)\\ &\quad =\frac{(-1)^k}{p}\bigg(p\sum_{\substack{j=0\\ (a-b)j\equiv c-bk \!\pmod p}}^k\binom{k}{j}+(2-p)^k-2^k\bigg). \end{align*} $$
We then deduce that
$$ \begin{align*} &{\mathcal M}_{k,f,c}(p)=p^{k-1}-\frac{(-1)^k}{p} \bigg(p\sum_{\substack{j=0\\ (a-b)j\equiv c-bk \!\pmod p}}^k\binom{k}{j}+(2-p)^k-2^k\bigg), \end{align*} $$
as desired. Lemma 2.4 is proved.
3. Proof of Theorem 1.1
In this section, we use Lemmas 2.1, 2.2 and 2.3 to show Theorem 1.1.
Proof of Theorem 1.1.
First of all,
$$ \begin{align} &{\mathcal N}_{k,f,c}(n) =\sharp\{(x_1,\ldots,x_{k})\in E_{f}(n)^k: x_1+\cdots+x_k\equiv c \pmod n\}\\ \notag & =\sharp\{(x_1,\ldots, x_{k})\in \mathbb Z_n^k: x_1 + \cdots + x_k \equiv c \pmod n, \gcd(f(x_i),n) =1, 1\le i\le k\} \\ \notag & =\sharp\{(x_1,\ldots, x_{k-1})\in\mathbb Z_n^{k-1}: \gcd\bigg(f\bigg(c-\sum_{i=1}^{k-1}x_i\bigg),n\bigg)=1, \gcd(f( x_i), n)=1, 1\le i\le k-1\}. \end{align} $$
Let
$n=p_1^{r_1}\cdots p_s^{r_s}$
be the standard prime factorisation of n. In Lemma 2.1, let
$R=\mathbb Z_n^{k\!-\!1}$
and, for any integer i with
$1\le i\le s$
, let
$$ \begin{align*}R_i=\bigg\{(x_1,\ldots,x_{k-1})\in R: f(x_1)\cdots f(x_{k-1}) f\bigg(c-\sum_{i=1}^{k-1}x_i\bigg)\equiv0\pmod {p_i}\bigg\}. \end{align*} $$
Then
$$ \begin{align} \bar R_i& =\bigg\{(x_1,\ldots,x_{k-1})\in R: f(x_1)\cdots f(x_{k-1}) f\bigg(c-\sum_{i=1}^{k-1}x_i\bigg)\not\equiv0 \pmod {p_i}\bigg\}\notag\\ &=\bigg\{(x_1,\!\ldots,x_{k-1}\!)\in R\!: \gcd\bigg(f\bigg(c-\sum_{i=1}^{k-1}x_i\bigg),p_i\bigg)=1, \gcd(f(x_j),p_i)=1, 1\le j\le k-1 \bigg\}. \end{align} $$
It follows from (3.1) and (3.2) that
$$ \begin{align} {\mathcal N}_{k,f,c}(n)=\sharp\bigcap_{i=1}^{s}\bar R_i \end{align} $$
and, for arbitrary integers
$i_1,\ldots , i_t$
with
$1\le i_1<\cdots <i_t\le s$
,
$$ \begin{align*} \bigcap_{j=1}^tR_{i_j} =\bigg\{(x_1,\ldots,x_{k-1})\in R: f(x_1)\cdots f(x_{k-1})f\bigg(c-\sum_{i=1}^{k-1}x_i\bigg) \equiv0 \ \bigg(\!\!\bmod \prod_{j=1}^{t} p_{i_j}\bigg)\bigg\}. \end{align*} $$
On the other hand, by Lemmas 2.2 and 2.3,
$$ \begin{align} &\sharp\bigcap_{j=1}^tR_{i_j}\notag =\sharp\bigg\{(x_1,\ldots,x_{k-1})\in R: f(x_1)\cdots f(x_{k-1})f\bigg(c-\sum_{i=1}^{k-1}x_i\bigg) \equiv 0 \ \bigg(\!\!\bmod \prod_{j=1}^{t} p_{i_j}\bigg)\bigg\} \notag\\ &=\bigg(\frac{n}{\prod_{j=1}^{t}p_{i_j}}\bigg)^{k-1} \sharp\bigg\{(x_1,\ldots, x_{ k - 1 })\in\mathbb Z_{\prod_{j=1}^tp_{i_j}}^{ k - 1}: \notag \\ &\qquad\qquad\qquad\quad f(x_1) \cdots f(x_{ k - 1 })f\bigg(c-\sum_{i=1}^{k-1}x_i\bigg) \equiv0 \ \bigg(\!\!\bmod {\prod_{j=1}^{t} p_{i_j}} \bigg) \bigg\}\notag\\ &= n^{k - 1} \prod_{j=1}^{t}\frac{1}{p_{i_j}^{k-1}} \sharp\bigg\{ (x_1,\ldots, x_{ k - 1 })\in\mathbb Z_{p_{i_j}}^{ k - 1}: f(x_1) \cdots f( x_{k - 1})f\bigg(c-\sum_{i=1}^{k-1}x_i\bigg)\equiv 0 \pmod{p_{i_j}}\bigg\}\notag\\ &=n^{k-1}\prod_{j=1}^{t}\frac{{\mathcal M}_{k,f,c}(p_{i_j})}{p_{i_j}^{k-1}}. \end{align} $$
It then follows from Lemma 2.1, (3.3) and (3.4) that
$$ \begin{align*} {\mathcal N}_{k,f,c}(n) =\sharp\bigcap_{i=1}^{s}\bar R_i &=\sharp R+\sum_{t=1}^s(-1)^t\sum_{1\leq i_1<\cdots<i_t\leq s} \sharp\bigcap_{j=1}^tR_{i_j}\\ &=n^{k-1}+\sum_{t=1}^s(-1)^t\sum_{1\leq i_1<\cdots<i_t\leq s}n^{k-1}\prod_{j=1}^{t}\frac{{\mathcal M}_{k,f,c}(p_{i_j})}{p_{i_j}^{k-1}}\\ &=n^{k-1}\bigg(1+\sum_{t=1}^s(-1)^t\sum_{1\leq i_1<\cdots<i_t\leq s}\prod_{j=1}^{t}\frac{{\mathcal M}_{k,f,c}(p_{i_j})}{p_{i_j}^{k-1}}\bigg)\\ &=n^{k-1}\prod_{p|n}\bigg(1-\frac{{\mathcal M}_{k,f,c}(p)}{{p}^{k-1}}\bigg), \end{align*} $$
as required. This concludes the proof of Theorem 1.1.
4. Proof of Theorem 1.2
In this section, we present the proof of Theorem 1.2.
Proof of Theorem 1.2.
Choose a prime p with
$p \mid n$
, so that
$\gcd (a,p)=1$
. By (1.2),
$$ \begin{align*} {\mathcal M}_{k,f,c}(p) &= \sharp\bigg\{ ( x_1,\ldots,x_{k-1})\in\mathbb Z_p^{ k - 1}: \bigg(a\bigg( c -\sum_{i=1}^{k-1}x_{i}\bigg)+b\bigg)\prod_{i=1}^{k-1} (ax_i+b) \equiv 0 \pmod p\bigg\}\\ &=\sharp\bigg\{ ( x_1,\ldots,x_{k-1})\in\mathbb Z_p^{ k - 1}: \\ &\qquad \bigg(c-\sum_{i=1}^{k-1}(x_{i}+ba^{-1})+kba^{-1}\bigg)\prod_{i=1}^{k-1}(x_i+ba^{-1}) \equiv 0 \pmod p\bigg\}. \end{align*} $$
Letting
$y_i=x_i+ba^{-1}$
for
$1\leq i\leq k-1$
gives
$$ \begin{align} &{\mathcal M}_{k,f,c}(p) =\sharp\bigg\{ ( y_1,\ldots,y_{k-1})\in\mathbb Z_p^{ k - 1}: y_1 \cdots y_{k-1}\bigg( c+kba^{-1}-\sum_{i=1}^{k-1}y_{i}\bigg) \equiv 0 \pmod p\bigg\}\notag\\ &=\sharp\mathbb Z_p^{ k-1}-\sharp\bigg\{ ( y_1,\ldots,y_{k-1})\in\mathbb Z_p^{ k - 1}: y_1 \cdots y_{k-1}\bigg( c+kba^{-1}-\sum_{i=1}^{k-1}y_{i}\bigg) \not\equiv 0 \pmod p\bigg\}\notag\\ &=\sharp\mathbb Z_p^{ k-1}-\sharp(\mathbb Z_p^*)^{k-1} +\sharp\bigg\{ ( y_1,\ldots,y_{k-1})\in(\mathbb Z_p^*)^{ k - 1}: c+kba^{-1}-\sum_{i=1}^{k-1}y_{i} \equiv 0 \pmod p\bigg\}\notag\\ &=p^{k-1}-(p-1)^{k-1}+\sharp\bigg\{ ( y_1,\ldots,y_{k-1})\in(\mathbb Z_p^*)^{k-1}: \sum_{i=1}^{ k-1}y_{i} \equiv c+kba^{-1} \pmod p\bigg\}\notag\\ &=p^{k-1}-(p-1)^{k-1}+N(k-1,c+kba^{-1},p). \end{align} $$
But (1.1) tells us that
$$ \begin{align} N(k-1,c+kba^{-1},p) =\begin{cases} {((p-1)^{k-1}+(-1)^{k-1}(p-1))}/{p} & {\textrm{if}}\ p\mid (c+kba^{-1}),\\ {((p-1)^{k-1}+(-1)^{k})}/{p} & {\textrm{if}}\ p\nmid (c+kba^{-1}). \end{cases} \end{align} $$
$$ \begin{align} {\mathcal M}_{k,f,c}(p)=p^{k-1}-\frac{(p-1)^k+(-1)^k\delta_p}{p} \end{align} $$
with
$\delta _p$
being given as in (1.3). Finally, by Theorem 1.1 and (4.3),
$$ \begin{align*} {\mathcal N}_{k,f,c}(n)=& n^{k-1}\prod_{p|n}\bigg(1-\frac{{\mathcal M}_{k,f,c}(p)}{p^{k-1}}\bigg)=n^{k-1}\prod_{p|n} \frac{(p-1)^k+(-1)^k\delta_p}{p^k}. \end{align*} $$
This finishes the proof of Theorem 1.2.
5. Proof of Theorem 1.3
In this section, we use Theorem 1.1 and Lemma 2.4 to prove Theorem 1.3.
Proof of Theorem 1.3.
Choose a prime p with
$p\mid n$
and let
$h(x)=(x-a) (x-b)$
with
$a=a_2a_1^{-1}$
and
$b=b_2b_1^{-1}$
taken modulo p. The inverses exist and
$a\not\equiv b \pmod p$
because
$\gcd (a_1,p)=\gcd (b_1,p) = \gcd(a_1b_2-a_2b_1,p) =1$
and for
$t\in\mathbb{Z}\mathrm{,}\ f(t)\equiv 0\pmod p$
if and only if
$h(t)\equiv 0\pmod p$
. Applying Lemma 2.4 to
$h(x)$
gives
$$ \begin{align*} {\mathcal M}_{k,f,c}(p) &={\mathcal M}_{k,h,c}(p)\\ &=p^{k-1}-\frac{(-1)^k}{p}\bigg(p\sum_{\substack{j=0\\ (a-b)j\equiv c-bk \!\!\pmod p}}^k\binom{k}{j}+(2-p)^k-2^k\bigg)\\ &=p^{k-1}-\frac{(-1)^k}{p}\bigg(p\sum_{\substack{j=0\\ (a_2a_1^{-1}-b_2b_1^{-1})j \equiv c-b_2b_1^{-1}k \!\!\pmod p}}^k\binom{k}{j}+(2-p)^k-2^k\bigg). \end{align*} $$
Then, applying Theorem 1.1,
$$ \begin{align*} &{\mathcal N}_{k,f,c}(n) =n^{k-1}\prod_{p| n}\bigg(1-\frac{{\mathcal M}_{k,f,c}(p)}{p^{k-1}}\bigg)\\ &=n^{k-1}\prod_{p|n}\frac{(-1)^k}{p^{k}}\bigg(p\sum_{\substack{j=0\\ (a_2a_1^{-1}-b_2b_1^{-1})j\equiv c-b_2b_1^{-1}k\!\!\pmod p}}^k\binom{k}{j}+(2-p)^k-2^k\bigg)\\ &=(-1)^{k\omega(n)}\prod_{p|n}p^{k\nu_p(n)-\nu_p(n)-k}\bigg(p\sum_{\substack{j=0\\ (a_2a_1^{-1}-b_2b_1^{-1})j\equiv c-b_2b_1^{-1}k\!\!\pmod p}}^k\binom{k}{j}+(2-p)^k-2^k\bigg)\\ &=(-1)^{k\omega(n)}\prod_{p|n}p^{k\nu_p(n)-\nu_p(n)-k}\bigg(p\sum_{\substack{j=0\\ (a_2b_1-a_1b_2)j\equiv a_1b_1c-a_1b_2k\!\!\pmod p}}^k\binom{k}{j} +(2-p)^k-2^k\bigg), \end{align*} $$
as expected. This completes the proof of Theorem 1.3.
Acknowledgements
The authors would like to thank Dr. Yulu Feng and the anonymous referee for their careful reading of the paper and very helpful suggestions and comments that improved the presentation of the paper.












