Problem 784

A place to air possible concerns or difficulties in understanding ProjectEuler problems. This forum is not meant to publish solutions. This forum is NOT meant to discuss solution methods or giving hints how a problem can be solved.
Forum rules
As your posts will be visible to the general public you are requested to be thoughtful in not posting anything that might explicitly give away how to solve a particular problem.

This forum is NOT meant to discuss solution methods for a problem.

In particular don't post any code fragments or results.

Don't start begging others to give partial answers to problems

Don't ask for hints how to solve a problem

Don't start a new topic for a problem if there already exists one


See also the topics:
Don't post any spoilers
Comments, questions and clarifications about PE problems.
Post Reply
Torpaz
Posts: 4
Joined: Tue Feb 08, 2022 9:31 pm

Problem 784

Post by Torpaz »

Hello,

Problem 784
I'm having big trouble understanding problem 784, am I the only one ?
Let's call a pair of positive integers $p$, $q$ ($p \lt q$) <i>reciprocal</i>, if there is a positive integer $r\lt p$ such that $r$ equals both the inverse of $p$ modulo $q$ and the inverse of $q$ modulo $p$.

For example, $(3,5)$ is one reciprocal pair for $r=2$.
I really don't understand this sentence, can someone elaborate the meaning ?
In the literal sense, for me, 3 modulo 5 = 3 and 5 modulo 3 = 2, the inverse of these numbers is not 2.
User avatar
jaap
Posts: 588
Joined: Tue Mar 25, 2008 3:57 pm
Contact:

Re: Problem 784

Post by jaap »

Torpaz wrote: Tue Feb 08, 2022 9:37 pm Hello,

Problem 784
I'm having big trouble understanding problem 784, am I the only one ?
Let's call a pair of positive integers $p$, $q$ ($p \lt q$) <i>reciprocal</i>, if there is a positive integer $r\lt p$ such that $r$ equals both the inverse of $p$ modulo $q$ and the inverse of $q$ modulo $p$.

For example, $(3,5)$ is one reciprocal pair for $r=2$.
I really don't understand this sentence, can someone elaborate the meaning ?
In the literal sense, for me, 3 modulo 5 = 3 and 5 modulo 3 = 2, the inverse of these numbers is not 2.
You misunderstood the meaning of the word "inverse". It means the multiplicative inverse. In the example, it means that $2\equiv3^{-1} \bmod 5$, and $2\equiv5^{-1} \bmod 3$ are both true (or equivalently $2\cdot3\equiv1 \bmod 5$, and $2\cdot5\equiv1 \bmod 3$ are both true).
Torpaz
Posts: 4
Joined: Tue Feb 08, 2022 9:31 pm

Re: Problem 784

Post by Torpaz »

Oh ok that makes sense
Post Reply