MODBasic
  
  
    Japan
  
  
    Difficult
  
  2016
  
  Let $p$ be an odd prime number. For positive integer $k$ satisfying $1\le k\le p-1$, the number of divisors of $k p+1$ between $k$ and $p$ exclusive is $a_k$. Find the value of $a_1+a_2+\ldots + a_{p-1}$.
 
    
      The solution for this problem is available for 
$0.99.
      You can also purchase a pass for all available solutions for 
$99.