The sum of product pairs of integers prime to $n$ For all composites $n$ take all pairs $a$, $b$ of integers relatively prime to $n$ with $a<b$ and $a+b=n$ to find the sum of all product pairs $a*b$.  
(a) For $n=34$ the sum is $1*33+3*31+\dotsb+15*19=1496$.  Find the remainder $r$ when divided by $34$ to get $r=0$. 
(b) For $n=24$ the sum is $1*23+5*19+7*17+11*13=380$ which gives $r=20$ when divided by $24$ and $20$ divides $380$.   
(c) All other $n$ have $r$ NOT dividing its sum. 
Is there a way of predicting the result (a), (b), or (c) for any $n$?
 A: It seems, from numerical experiments, that the very same conjecture can be made, as for your previous question .
Let $q$ be a prime number and  $n=\prod_q q^{v_q}$ be the prime factorization of the integer $n >1 $. We have:

$$ n \ \text{  does not divide}\sum_{\begin{align*} \ 1&\le i \le
 \frac{n}{2}\\  &(i,n)=1  \end{align*}}i^2 $$ if and only if
  \begin{align*}  &n=2^k q^m &\text{where } k>0,m \ge0 &\text{ and
 }q\equiv 3 \bmod4 \\ \text { or }\ \ &n=2^k 3^\ell\prod_{q} q^{v_q}&\text{where } k \ge0 , \ell >0, v_q \ge 0 &\text{ and }q\equiv 5 \bmod6.
 \end{align*}

This was verified numerically up to $n=10000$. There are $2221$ such $n$ up to $10000$.
Quadratic reciprocity is probably involved in any proof of this conjecture.
It also seems that the proportion of integers $n$ which dot not fall in case (a) tends to zero as $n$ grows to infinity.
EDIT (Oct 20th, 2018)  I have found a proof for the above conjecture. It does not need Quadratic Reciprocity, it is a bit lengthy though.
The outline of the proof is to show first that, for $n \ge 3$, we have 
   $$ g(n,2):=\sum_{\underset{(j,n)=1}{j=1}}^\frac{n}{2} j^2 =
\begin{cases}
& \frac{n^2}{24}\varphi(n)- \frac{n}{24}\prod_{p|n}(1-p)    \text{  when } n \equiv \pm 1 \bmod 4\\
&\frac{n^2}{24}\varphi(n)+ \frac{n}{12}\prod_{p|n}(1-p)  \text{   when }n \equiv 0 \bmod 4\\
& \frac{n^2}{24}\varphi(n)- \frac{n}{6}\prod_{p|n}(1-p)  \text{   when } n \equiv 2 \bmod 4\end{cases}
$$
where $\varphi(n)$ is the number of natural numbers smaller than $n$ and coprime to $n$ (Euler totient fucntion). This is obtained with the well known closed expression for the sum of the first consecutive squares and removing the non coprime. The above expression makes it clear that $12g(n,2)$ is always divisible by $n$. Then, with help of the above expression, we study the divisibility of $g(n,2)$ by $n$, for different cases, covering all the possibilities:   
case 1: $(n,6)=1$, then  $n$ divides $g(n,2)$.
case 2: $(n,6)\neq1$ 
case 2.1: $(n,6)\neq1$ and $n$ odd.  


*

*case 2.1.1: There is $q$ such that $q\equiv 1 \bmod 6$ and $q|n$ then $n$ divides $g(n,2)$.  

*case 2.1.2: There is no such $q$, then $n$ does not divide $g(n,2)$.


case 2.2: $n$ is even.  


*

*case 2.2.1: $n$ has no odd prime divisor , then $n$ does not divide $g(n,2)$. Nota: this is shown for $n>2$, but this is clearly
true also for $n=2$.

*case 2.2.2: $n$ has at least one odd divisor.      


*

*case 2.2.2.1: $\frac{n}{2}$ is odd.      


*

*case 2.2.2.1.1: $3$ divides $n$, then $n$ divides $g(n,2)$  if and only if there is a    prime divisor $q$ of $n$ such that $q \equiv 1 \bmod 6$.        

*case 2.2.2.1.2: $3$ does not divide    $n$, then $n$    divides $g(n,2)$  if and only if  $n$ has more than     one odd prime factor     or its    unique odd prime factor $q$ verify $q\equiv 1 \bmod 4$.


*case 2.2.2.2: $\frac{n}{2}$ is even.


*

*case 2.2.2.2.1: $3$ divides $n$, then $n$ divides $g(n,2)$  if and only if there is a    prime divisor $q$ of $n$ such that $q \equiv 1  \bmod 6$.        

*case 2.2.2.2.2: $3$ does not divide $n$, then $n$ divides $g(n,2)$  if and only if $n$ has more than one odd prime factor or its unique odd prime factor $q$ verify $q\equiv 1 \bmod 4$.
