Prime Divisor Sum

  • For every $c<p$, there is an unique $i$ with $c\mid ip+1$ and $i\leq c<p$.
  • Work modulo $a$ to prove the 2 parts. 
  • The 2 parts are proving $i$ exists and $i$ is unique.

Let $A_i$ be the set of divisors of $ip+1$ which are not less than $i$ and less than $p$.

We will prove that $A_i$ are disjoint and $A_1\cup A_2\cup A_3...\cup A_{p-1} = \{1,2,3...,p-1\}$


Step 1: 

proof that $A_i$ and $A_j$ are disjoint for all pairs $i,j<p$

For the sake of contradiction, assume that there is a term, say $c$ for which, $c\in A_i$ and $c\in A_j$.

So, $i\leq c<p$ and $j\leq c<p$

Also, $ip+1\equiv jp+1\equiv 0 \pmod c \implies (i-j)p\equiv 0\pmod c$

So, $c\mid p(i-j)$. But, $c<p \implies \gcd(c,p)=1$.

So, $c\mid i-j$

Again, $i,j\leq a$ and $i\neq j$. So, $|i-j| < c$

So, $c\nmid i-j$. Contradiction.


Step 2: 

proof that for all $c<p$, there is a $i<p$ with $c\in A_i$.

For the sake of contradiction, assume that there is no such $i$.

So, $c\nmid ip+1$ for all $i\leq c$

Using php, we have $j\neq k$ such that $jp+1\equiv kp+1 \pmod c$

$\implies (j-k)p\equiv 0 \pmod{c}$

In the same way as the first part, this can be contradicted.

So, for all $c$, there is an unique $i<p$ with $c\in A_i$.

So, $A_1\cup A_2\cup A_3...\cup A_{p-1} = \{1,2,3...,p-1\}$

So, $a_1+a_2+a_3+...+a_{p-1} = |\{1,2,3...,p-1\}|=p-1$.


The answer is $p-1$.