Sums of one quadratic residue and one quadratic nonresidue mod p

by math_explorer, Jun 18, 2012, 10:15 AM

Achievement GET: max out the title character limit exactly!

Okay so this isn't algebra but it was an omitted substep of an omitted substep of a step in a crazy solution to a trigonometric-function problem.

:(

Let $p$ be an odd prime (actually $p = 17$ in the problem so the cases at the end weren't needed); below, we are working entirely under $\bmod{p}$ residue classes with extremely sloppy terminology.

Lemma. For each $x$ which is a quadratic residue, excluding $0$, and each $y$ which is a quadratic nonresidue, compute $x + y$. Then each nonzero value is attained by $x + y$ equally many times, explicitly, $\left\lfloor \frac{p}{4} \right\rfloor$.

Proof. Let $g$ be a primitive root. Then it is certainly not a quadratic residue (or $g^n$ would never attain a nonresidue). So if $x$ is a residue and $y$ is not, then $gy$ is a residue and $gx$ is not.

This way we can map each pair $(x, y)$ with sum $x + y$ to $(gy, gx)$ with sum $g(x + y)$, and this mapping is also clearly reversible ($g^{-1}$ exists), and therefore bijective. So each sum $s$ appears as many times as $gs$, so the sum $g^n$ appears as many times as $1$, and since $g^n$ will attain every nonzero value, each nonzero sum appears equally many times.

To get the formula just count how many times $0$ is attained: if $p$ is of the form $4k+1$ then $-1$ is a quadratic residue so $(x, -x)$ are both residues or both nonresidues and will never appear; if $p$ is of the form $4k+3$ then $-1$ is a nonresidue, so $(x, -x)$ appears for each residue $x$, of which there are $\frac{p-1}{2}$.

The total number of pairs is $\left( \frac{p-1}{2} \right)^2$; the total number of pairs with nonzero sum is that minus $\frac{p-1}{2}$ if $p = 4k+3$; subtract if applicable, divide by the $p-1$ nonzero sums, and insert a floor function randomly so that we don't have to give a function with cases to get the result.

Comment

0 Comments

♪ i just hope you understand / sometimes the clothes do not make the man ♫ // https://beta.vero.site/

avatar

math_explorer
Archives
+ September 2019
+ February 2018
+ December 2017
+ September 2017
+ July 2017
+ March 2017
+ January 2017
+ November 2016
+ October 2016
+ August 2016
+ February 2016
+ January 2016
+ September 2015
+ July 2015
+ June 2015
+ January 2015
+ July 2014
+ June 2014
inv
+ April 2014
+ December 2013
+ November 2013
+ September 2013
+ February 2013
+ April 2012
Shouts
Submit
  • how do you have so many posts

    by krithikrokcs, Jul 14, 2023, 6:20 PM

  • lol⠀⠀⠀⠀⠀

    by math_explorer, Jan 20, 2021, 8:43 AM

  • woah ancient blog

    by suvamkonar, Jan 20, 2021, 4:14 AM

  • https://artofproblemsolving.com/community/c47h361466

    by math_explorer, Jun 10, 2020, 1:20 AM

  • when did the first greed control game start?

    by piphi, May 30, 2020, 1:08 AM

  • ok..........

    by asdf334, Sep 10, 2019, 3:48 PM

  • There is one existing way to obtain contributorship documented on this blog. See if you can find it.

    by math_explorer, Sep 10, 2019, 2:03 PM

  • SO MANY VIEWS!!!
    PLEASE CONTRIB
    :)

    by asdf334, Sep 10, 2019, 1:58 PM

  • Hullo bye

    by AnArtist, Jan 15, 2019, 8:59 AM

  • Hullo bye

    by tastymath75025, Nov 22, 2018, 9:08 PM

  • Hullo bye

    by Kayak, Jul 22, 2018, 1:29 PM

  • It's sad; the blog is still active but not really ;-;

    by GeneralCobra19, Sep 21, 2017, 1:09 AM

  • dope css

    by zxcv1337, Mar 27, 2017, 4:44 AM

  • nice blog ^_^

    by chezbgone, Mar 28, 2016, 5:18 AM

  • shouts make blogs happier

    by briantix, Mar 18, 2016, 9:58 PM

91 shouts
Contributors
Tags
About Owner
  • Posts: 583
  • Joined: Dec 16, 2006
Blog Stats
  • Blog created: May 17, 2010
  • Total entries: 327
  • Total visits: 357021
  • Total comments: 368
Search Blog
a