4
$\begingroup$

QUESTION. Let $p$ be an odd prime and let $a,b,c\in\mathbb Z$. How to determine the parity of the sum $$S_p(a,b,c)=\sum_{1\le j<k\le p-1\atop p\nmid aj^2+bjk+ck^2}(aj^2+bjk+ck^2)$$ in terms of $a,b,c$ and $p$? Can one find an explicit pattern for the parity of $S_p(a,b,c)$?

Your comments are welcome!

$\endgroup$
5
  • 1
    $\begingroup$ If $ax^2+bxy+cy^2$ does not factor over $\mathbb{F}_p$, then the count is just $0$. If it does factor, say $ax^2+bxy+cy^2 = (q x+ r y)(s x+t y)$, then the answer is $N_p(-q/r)+N_p(-s/t)$, of course excluding certain degenerate cases which are easy to deal with separately, where I'm writing $N_p(z)$ for the number of elements $x$ of $\mathcal{S}_p=\{1,2,\ldots,p-1\}$ such that the minimal representative in $\mathcal{S}_p$ of $zx$ is greater than $x$. So I think your question boils down to understanding this function $N_p$. $\endgroup$
    – R.P.
    Commented Sep 10 at 17:35
  • $\begingroup$ To see that this is not a reduction to a harder problem: if $p|a$, we can ignore the first term and we are really counting the zeros (over $\mathbb{F}_p$) of $y(bx+cy)$ satisfying $x,y \neq 0$ and $x<y$. If we further assume $p \nmid b,c$, then this number equals $N_p(-b/c)$, in the notation of my previous comment. So if I know your function $S_p$, I also know my function $N_p$. $\endgroup$
    – R.P.
    Commented Sep 10 at 17:44
  • $\begingroup$ Note that the summand $aj^2+bjk+ck^2$ cannot be replaced by its nonnegative residue modulo $p$. $\endgroup$ Commented Sep 11 at 5:51
  • $\begingroup$ Yes, I completely misread the question. I beg your pardon. $\endgroup$
    – R.P.
    Commented Sep 11 at 8:13
  • 1
    $\begingroup$ Surely it's simpler to first handle the sum without the condition that $p\nmid aj^2+bjk + ck^2$, which should have a closed-form formula, and then subtract off the sum with the condition $p\mid aj^2+bjk + ck^2$? $\endgroup$
    – Will Sawin
    Commented Sep 12 at 18:53

1 Answer 1

1
$\begingroup$

This is not a complete answer.

Claim 1. Let $D=b^2-4ac$. If $\left( \frac{D}{p}\right)=-1$, then $$S_p(a,b,c)\equiv a\frac{(p-1)^2}{4}+b\frac{(p-1)(p-3)}{8}\pmod{2}.$$ Proof.

Let $f(x,y)=ax^2+bxy+cy^2$. Then \begin{align} S_p(a,b,c)&\equiv\sum_{1\le j<k\le p-1\atop p\nmid f(j,k),2\nmid j, 2\nmid k}f(j,k)+\sum_{1\le j<k\le p-1\atop p\nmid f(j,k),2\nmid j, 2\mid k}f(j,k)+\sum_{1\le j<k\le p-1\atop p\nmid f(j,k),2\mid j, 2\nmid k}f(j,k)\\ &\equiv \sum_{1\le j<k\le p-1\atop p\nmid f(j,k),2\nmid j, 2\nmid k}(a+b+c)+\sum_{1\le j<k\le p-1\atop p\nmid f(j,k),2\nmid j, 2\mid k}a+\sum_{1\le j<k\le p-1\atop p\nmid f(j,k),2\mid j, 2\nmid k}c\pmod{2}. \end{align} Noting that $\left( \frac{D}{p}\right)=-1$, it follows that $$4af(j,k)=(2aj+bk)^2-Dk^2\not\equiv 0\pmod{p}.$$ So $$f(j,k)\not\equiv 0\pmod{p}.$$ Therefore $$\sum_{1\le j<k\le p-1\atop p\nmid f(j,k),2\nmid j, 2\nmid k}1 =\sum_{1\le j<k\le p-1\atop 2\nmid j, 2\nmid k}1= \frac{p^2-4p+3}{8},$$ $$\sum_{1\le j<k\le p-1\atop p\nmid f(j,k),2\nmid j, 2\mid k}1 =\sum_{1\le j<k\le p-1\atop 2\nmid j, 2\mid k}1= \frac{p^2-1}{8},$$ $$\sum_{1\le j<k\le p-1\atop p\nmid f(j,k),2\mid j, 2\nmid k}1 =\sum_{1\le j<k\le p-1\atop 2\mid j, 2\nmid k}1= \frac{p^2-4p+3}{8}$$ and \begin{align} S_p(a,b,c)&\equiv(a+b+2c)\frac{p^2-4p+3}{8}+a\frac{p^2-1}{8}\\ &\equiv a\frac{(p-1)^2}{4}+b\frac{(p-1)(p-3)}{8} \pmod{2}. \end{align} Remark 1. Calculations show that if $2\nmid a$, $2\nmid b$, $2 \mid c$ and $\left( \frac{D}{p}\right)=1$, then for almost all odd prime $p$, $S_p(a,b,c)\equiv a\frac{(p-1)^2}{4}+b\frac{(p-1)(p-3)}{8}\pmod{2}.$

For example, when $(a,b,c)=(123,567,456)$,$\left( \frac{D}{p}\right)=1$ and $p\leq 1987$, $$S_p(123,567,456)\equiv 123\frac{(p-1)^2}{4}+567\frac{(p-1)(p-3)}{8}\pmod{2}$$ except for $p=19.$


Conj. If $2\nmid a$, $2\nmid b$, $2 \mid c$, $\left( \frac{D}{p}\right)=1$ and $\left( \frac{ac(a+b+c)}{p}\right)\neq 0$, then $$S_p(a,b,c)\equiv a\frac{(p-1)^2}{4}+b\frac{(p-1)(p-3)}{8}\equiv\frac{p^2-1}{8}\pmod{2}.$$

$\endgroup$
5
  • $\begingroup$ Something must be wrong in your argument: unless I am mistaken $S_{11}(1,1,1)=4785$ while $(1+1+1)(11^2-4.11+3)/8=30$, and $(-3,11)=-1$. $\endgroup$ Commented Sep 12 at 10:23
  • $\begingroup$ @Henri Cohen I missed two cases:$2\nmid j, 2\mid k$ and $2\mid j, 2\nmid k$; the proof has been revised. Thank you for your counterexample. $\endgroup$
    – Deyi Chen
    Commented Sep 12 at 12:57
  • $\begingroup$ $S_{11}(1,2,2)=8745$, $(1+2+4)(11^2-4.11+3)/8+2.(11^2-1)/8=100$, and $(-4/11)=-1$. $\endgroup$ Commented Sep 12 at 13:16
  • $\begingroup$ @ Henri Cohen Typo: the last term should be $a\frac{p^2-1}{8}.$ Thank you for your counterexample. $\endgroup$
    – Deyi Chen
    Commented Sep 12 at 13:32
  • 1
    $\begingroup$ If $p$ never divides $f(j,k)$, then the sum can be evaluated directly, i.e. there is no need to split it into the cases. For example, Maple computes the sum right away: $$\sum_{1\leq j<k\leq p-1} aj^2+bjk+ck^2 = \frac{(p-2)(p-1)p (2 a p +3 b p +6 c p -2 a -b -2 c)}{24}.$$ $\endgroup$ Commented Sep 12 at 17:16

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .