2
$\begingroup$

Let $P\ne Q$ be an arbitrary pair of primes, $M=PQ$.

$S$ = sum of all $m<M$ co-prime to $M$ such that equation $Px+Qy=m\ (1)$ has a solutions in natural numbers.

$s$ = sum of all $m<M$ co-prime to $M$ such that this equation is not solvable.

Is the assertion $S-s=\dfrac{(P^2-1)(Q^2-1)}{6}$ right?

$\endgroup$
8
  • $\begingroup$ $P=2$ and $Q=3$ seems to be a counterexample. $\endgroup$
    – user1688
    Sep 6, 2017 at 11:09
  • $\begingroup$ For $P=2$ and $Q=3$ $S=5,\ s=1$ $\dfrac{(2^2-1)(3^2-1)}{6}=4=5-1$ $\endgroup$
    – Andrew
    Sep 6, 2017 at 12:54
  • $\begingroup$ How is $m_i$ related to $m$? $\endgroup$ Sep 6, 2017 at 13:19
  • $\begingroup$ $\gcd(M,m)=1,m<M$. $m_i$ runs through all values $m$. Probably i`ve explained not exactly, but hope you understand. $\endgroup$
    – Andrew
    Sep 6, 2017 at 14:06
  • $\begingroup$ Well, $m_i$ is gone now, and the question makes more sense without it. $\endgroup$ Sep 6, 2017 at 23:28

3 Answers 3

3
$\begingroup$

Consider the set $$T = \{ (x,y)\ :\ 1\leq x\leq Q,\ 1\leq y\leq P,\ Px+Qy\leq PQ\}.$$ It is easy to see that $$S = \sum_{(x,y)\in T} (Px+Qy).$$

Switching to double summation in $S$, we get $$S = \sum_{y=1}^{P} \sum_{x=1}^{X_y} (Px+Qy) = \sum_{y=1}^{P} QyX_y + P\frac{X_y(X_y+1)}2,$$ where $$X_y = \left\lfloor \frac{PQ-Qy}P\right\rfloor = Q + \frac{-Qy - Z_y}P$$ and $$Z_y = -Qy\bmod P.$$ Hence, $$S=\sum_{y=1}^{P} \left(\frac{PQ^2+PQ}2 - \frac{Q}{2}y - (Q+\frac{1}{2})Z_y + \frac{1}{2P}Z_y^2 - \frac{Q^2}{2P}y^2\right).$$ Since $(P,Q)=1$, $Z_y$ runs over $\{0,1,\dots,P-1\}$ when $y$ runs over $\{1,2,\dots,P\}$. Therefore, $$S = \frac{P^2Q^2+P^2Q}2-\frac{QP(P+1)}{2}-(Q+\frac{1}{2})\frac{P(P-1)}2+\frac{(P-1)P(2P-1)}{12P}-\frac{Q^2P(P+1)(2P+1)}{12P}$$ $$=\frac{(P-1)(Q-1)(4PQ+P+Q+1)}{12}.$$


Now, the sum of all $m<PQ$ coprime to $PQ$ equals $$S+s=\frac{PQ(PQ-1)}2 - P\frac{Q(Q-1)}2 - Q\frac{P(P-1)}2=\frac{PQ(P-1)(Q-1)}2,$$ implying that $$s = \frac{PQ(P-1)(Q-1)}2 - S = \frac{(P-1)(Q-1)(2PQ-P-Q-1)}{12}.$$ Finally, $$S-s = \frac{(P-1)(Q-1)(4PQ+P+Q+1)}{12} - \frac{(P-1)(Q-1)(2PQ-P-Q-1)}{12}$$ $$=\frac{(P^2-1)(Q^2-1)}6$$ as expected.

$\endgroup$
2
$\begingroup$

T C Brown and Peter Jau-shyong Shiue, A remark related to the Frobenius problem, Fibonacci Quart. 31 (1993) 32-36, MR 93k:11018 gives you what you need.

"For given $a,b$ with $(a, b) = 1$, let $NR(a, b)$ denote the set of numbers nonrepresentable in terms of $a,b$. Thus, $NR(a, b)$ is the set of all those nonnegative integers $n$ which cannot be expressed in the form $n = ax + by$, where $x,y$ are nonnegative integers. Let $$S(a,b) = \sum\{\,n : n \in NR(a,b)\,\}$$ equal the sum of the numbers nonrepresentable in terms of $a$ and $b$.... In this note we find that, in fact, $$S(a,b)={1\over12}(a-1)(b-1)(2ab-a-b-1)"$$

Note that there is no need here for $a,b$ to be prime numbers; relative primality is all that is required.

Now, you'll have to do some fiddling to get exactly what you want. You want natural numbers, while the paper is about nonnegative numbers. But if $x=0$ (resp., $y=0$), then $n$ is a multiple of $b$ (resp., $a$), and it's easy to calculate the contribution of those values to the sum.

Also, you want the difference between the representables and the nonrepresentables. But of course the sum of the representables and the nonrepresentables is just all the sum of all the integers from $1$ to your $M$, which is easy, even after you account for the ones not relatively prime to $M$, and having the sum and one of the terms you can work out the difference easily enough.

The paper is available online and is quite easy to read.

A follow-up paper, Oystein J Rodseth, A note on T. C. Brown & P. J.-S. Shiue's paper: "A remark related to the Frobenius problem", Fibonacci Quart. 32 (1994) 407-408, MR 95j:11022, evaluates the sum of the $m$th powers of the nonrepresentables for all nonnegative integers $m$.

$\endgroup$
0
$\begingroup$

Gerry Myerson, Max Alekseyev, thank you! Sum of the representables $S'=\dfrac{(P+1)(Q+1)(4M-P-Q+1)}{12};S=\dfrac{(P-1)(Q-1)(4M+P+Q+1)}{12}.$ Curious. $P\rightarrow -P,Q\rightarrow -Q.$ I need time to read everything. The problem has grown from another problem on the number of solutions $N$ of the system $\begin{cases} X+Y+Z+T = M \\ XY\equiv ZT \mod M \end{cases}$ also in natural numbers for odd $M=PQ:$ $\ N=\dfrac{S-s}{4}-\dfrac{(P-1)(Q-1)}{4}=\dfrac{(M-2)^2-(P+Q-3)^2}{24}$. For other compound numbers the question is open, for a prime $M$ the system is undecidable: $(X-Y)^2\equiv (Z-T)^2\mod M$.

$S-s=\dfrac{(P^2-1)(Q^2-1)}{6}=\dfrac{\varphi (M)\sigma (M)}{6}.$ Is it possible to generalize, or is it an accident? Do not rush.

$\endgroup$
3
  • $\begingroup$ It's not clear what generalization you ask for. In general, the solutions to the system can be expressed parametrically using roots of 1 modulo $M$. E.g. for $M=PQ$, there are 4 roots: $\pm 1$, $\pm (PP'-QQ')$, where $PP'\equiv 1\pmod{Q}$ and $QQ'\equiv 1\pmod{P}$. Anyway, if you can better formalize your query, I'd suggest to post it in a separate MO question, not as an answer to your own question. $\endgroup$ Sep 7, 2017 at 12:51
  • $\begingroup$ System Solutions - in two ways. The second method is easier: for an arbitrary $Z$ suitable value $X\equiv -Z \mod P,Y\equiv -Z \mod Q,T=M-X-Y-Z$. But the problem of the number of solutions of the system $N$. For an odd $M=PQ$, it is possible to give the exact value $N$, this is directly related to the topic. $N_{15}=\dfrac{13^2-5^2}{24}=6.$ We have 6 solutions: $8\cdot 4\equiv 2\cdot 1;7\cdot 3\equiv 3\cdot 2;5\cdot 4\equiv 5\cdot 1;9\cdot 2\equiv 3\cdot 1;8\cdot 1\equiv 4\cdot 2;6\cdot 2\equiv 4\cdot 3$. $N_{105}=?$ About $\sigma(M)$ only vague suspicions. $\endgroup$
    – Andrew
    Sep 7, 2017 at 16:02
  • $\begingroup$ Do not be angry at my English, I'm learning from GOOGLE. $\endgroup$
    – Andrew
    Sep 7, 2017 at 16:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.