Let $p$ and $q$ be distinct primes such that $\displaystyle \sum_{k=1}^{q} \left\{\frac{kp}{q} \right\}=51$. Find the unit digit of $q$.
Note that $\{a\}$ signifies the fractional part of $a$.
Let $p$ and $q$ be distinct primes such that $\displaystyle \sum_{k=1}^{q} \left\{\frac{kp}{q} \right\}=51$. Find the unit digit of $q$.
Note that $\{a\}$ signifies the fractional part of $a$.
Copyright © 2021 JogjaFile Inc.
Let,
$S = \displaystyle \sum_{k=1}^{q} \left\{\frac{kp}{q} \right\}$
Since the summand is $0$ for $k = 0$ and $k = q$, we get,
$ S = \displaystyle \sum_{k=0}^{q} \left\{\frac{kp}{q} \right\} $
Change $k$ to $q-k$
$ \displaystyle \implies S = \sum_{k=0}^{q} \left\{p-\frac{kp}{q} \right\} $
$ \displaystyle = \sum_{k=1}^{q-1} \left\{-\frac{kp}{q} \right\} $
Note that,
$ \{x\} + \{-x\} = 1 \ ; \ \forall \ x \notin \mathbb{Z} $
$ \implies S = \displaystyle \sum_{k=1}^{q-1} \left(1 - \left\{\frac{kp}{q} \right\}\right) $
$ \implies S = q-1 - S $
$ \implies S = \dfrac{q-1}{2} $
Since $S = 51$
$ \implies q = 103 $
$ \implies q \pmod {10} = 3 $