Do not attempt to list

Find the number of positive integers n 2003 n\leq 2003 , such that both n n and n + 1 n+1 are quadratic residues modulo the prime 2011 2011 .


The answer is 501.

This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try refreshing the page, (b) enabling javascript if it is disabled on your browser and, finally, (c) loading the non-javascript version of this page . We're sorry about the hassle.

2 solutions

Piyushkumar Palan
Oct 23, 2013
  • For odd prime p p , in cyclic interval [ 0 , p 1 ] [0, p-1] , we have p + 1 4 \frac{p+1}{4} consecutive q . r q.r if p 1 ( m o d 4 ) p \equiv -1 \pmod{4}

  • So for p = 2011 p = 2011 , we have 503 503 cyclically consecutive q . r q.r But n n and n + 1 n + 1 to be counted here only if n n is positive integer 2003 \leq 2003

  • We can manually find 2 1005 1 ( m o d 2011 ) 2^{1005} \equiv -1 \pmod{2011} and 3 1005 1 ( m o d 2011 ) 3^{1005} \equiv -1 \pmod{2011} So 2 2 and 3 3 are q . n . r q.n.r . So 6 6 must be q . r q.r . Also 1 1 and 4 4 are always q . r q.r

  • So 2 -2 , 3 -3 will be q . r q.r and 1 , 4 , 6 -1, -4, -6 will be q . n . r q.n.r mod 2011 (as 2011 1 ( m o d 4 ) 2011 \equiv -1 \pmod{4} ) means 2008 , 2009 2008, 2009 are q . r q.r and 2005 , 2007 , 2010 2005, 2007, 2010 are q . n . r q.n.r (no conclusion needed about 2006 2006 )

  • So only n = 0 , n = 2008 n=0, n=2008 need to be rejected out of 503 503 consecutive q . r q.r

  • So answer 503 2 = 501 503 - 2 = \boxed{501}

I used this proof for claim in first line of solution:

(using LS: Legendre Symbol)

The number of k [ 0 , p 1 ] k∈[0,p-1] such that k k and k + 1 k+1 are both quadratic residues is equal to:

1 4 k = 0 p 1 ( 1 + L S ( k , p ) ) ( 1 + L S ( k + 1 , p ) ) + 3 + L S ( 1 , p ) 4 \frac{1}{4} \displaystyle \sum_{k=0}^{p-1} (1+LS(k,p))(1+LS(k+1, p))+ \frac{3+LS(-1,p)}{4}

where the extra term is relative to the only k = 1 k=-1 and k = 0 k=0 , in order to compensate the fact that the Legendre symbol L S ( 0 , p ) LS(0,p) is 0, although 0 is a quadratic residue.

Since: k = 0 p 1 L S ( k , p ) = k = 0 p 1 L S ( k + 1 , p ) = 0 \displaystyle \sum_{k=0}^{p-1} LS(k,p) = \displaystyle \sum_{k=0}^{p-1} LS(k+1,p) = 0

( sum 0 0 because no. of q . r q.r = no. of q . n . r q.n.r mod prime p )

the number of consecutive quadratic residues is equal to p + 3 + L S ( 1 , p ) 4 + 1 4 k = 0 p 1 L S ( k ( k + 1 ) , p ) \frac{p+3+ LS(-1,p)}{4} + \frac{1}{4}\displaystyle \sum_{k=0}^{p-1} LS(k(k+1),p)

By the multiplicativity of the Legendre symbol, for k 0 k≠0 we have L S ( k , p ) = L S ( k 1 , p ) , LS(k,p) = LS(k^{-1},p),

so: k = 1 p 1 L S ( k ( k + 1 ) , p ) = k = 1 p 1 L S ( 1 + k 1 , p ) = k = 2 p L S ( k , p ) = 1 \displaystyle \sum_{k=1}^{p-1} LS(k(k+1),p) = \displaystyle \sum_{k=1}^{p-1} LS(1+k^{-1},p) = \displaystyle \sum_{k=2}^{p} LS(k,p) = -1

and so we have p + 3 4 \frac{p+3}{4} consecutive quadratic residues if p 1 ( m o d 4 ) p \equiv 1\pmod{4} and p + 1 4 \frac{p+1}{4} consecutive quadratic residues if p 1 ( m o d 4 ) p \equiv -1\pmod{4}

Piyushkumar Palan - 7 years, 7 months ago

Log in to reply

Nice solution! The Legendre symbol sum calculation looks harder than the solution count that C.L. did, but is also quite natural.

The easiest way to show that 2 and 3 are q.n.r. modulo 2011 is to use the quadratic reciprocity law.

Alexander Borisov - 7 years, 7 months ago
C Lim
Oct 20, 2013

The main result we will prove is:

  • if p 3 ( m o d 4 ) p \equiv 3 \pmod 4 is prime, then there are exactly p 3 4 \frac {p-3} 4 pairs ( x , y ) (x, y) of quadratic residues modulo p p , x , y ≢ 0 ( m o d p ) x, y \not\equiv 0 \pmod p , such that y x 1 ( m o d p ) y - x \equiv 1 \pmod p .

E.g. when p = 19 p=19 , the quadratic residues are 0, 1, 4, 5, 6, 7, 9, 11, 16, 17, so the four pairs are (4, 5), (5, 6), (6, 7), (16, 17).

-

First, suppose we have a 2 b 2 1 ( m o d p ) a^2 - b^2 \equiv 1 \pmod p . This gives ( a b ) ( a + b ) 1 ( m o d p ) (a-b)(a+b) \equiv 1 \pmod p , so there are exactly p 1 p-1 pairs of ( a , b ) (a, b) satisfying this congruence, which are in bijective correspondence with the pairs of ( x , y ) (x,y) modulo p p satisfying x y 1 ( m o d p ) xy \equiv 1\pmod p , via:

( x , y ) ( a , b ) ( x + y 2 , y x 2 ) m o d p . (x,y)\mapsto (a,b) \equiv \left(\frac{x+y} 2, \frac{y-x}2\right) \mod p.

The unwanted case b 2 0 ( m o d p ) b^2 \equiv 0 \pmod p holds if and only if x y ( m o d p ) x\equiv y\pmod p , i.e. if and only if ( x , y ) ( 1 , 1 ) , ( 1 , 1 ) ( m o d p ) (x,y) \equiv (1,1), (-1,-1) \pmod p .

The unwanted case a 2 0 ( m o d p ) a^2 \equiv 0\pmod p does not occur since p 3 ( m o d 4 ) p\equiv 3 \pmod 4 so -1 is not a quadratic residue.

Now we are left with p 3 p-3 ordered pairs of ( x , y ) (x,y) .

Finally, suppose the pairs ( x , y ) (x,y) and ( x , y ) (x',y') give rise to ( a 2 , b 2 ) (a^2, b^2) and ( a 2 , b 2 ) (a'^2, b'^2) respectively. Then the two latter pairs are equal if and only if:

a 2 a 2 ( m o d p ) a ± a ( m o d p ) , b 2 b 2 ( m o d p ) b ± b ( m o d p ) \begin{aligned}a'^2 \equiv a^2 &\pmod p \iff a' \equiv \pm a\pmod p,\\ b'^2 \equiv b^2 &\pmod p\iff b' \equiv \pm b\pmod p\end{aligned}

thus giving rise to four possible cases:

a a , b b ( m o d p ) x x , y y ( m o d p ) ; a'\equiv a, b'\equiv b\pmod p \iff x'\equiv x, y'\equiv y\pmod p; a a , b b ( m o d p ) x y , y x ( m o d p ) ; a'\equiv -a, b'\equiv b\pmod p\iff x'\equiv -y, y'\equiv -x\pmod p; a a , b b ( m o d p ) x y , y x ( m o d p ) ; a'\equiv a, b'\equiv -b\pmod p\iff x'\equiv y, y'\equiv x\pmod p; a a , b b ( m o d p ) x x , y y ( m o d p ) . a'\equiv -a, b'\equiv -b\pmod p\iff x'\equiv -x, y'\equiv -y\pmod p.

It is easy to see that for the p 3 p-3 pairs of ( x , y ) (x,y) , x ≢ ± y ( m o d p ) x \not\equiv \pm y\pmod p so these four cases are all distinct. Hence there are exactly p 3 4 \frac{p-3} 4 pairs of n , n + 1 n, n+1 which are both quadratic residues, where 1 n p 2 1\le n\le p-2 .

-

For our problem, p = 2011 p=2011 so there are 2011 3 4 = 502 \frac {2011 - 3} 4 =502 such pairs. It remains to subtract from this the number of pairs ( n , n + 1 ) (n, n+1) , for which 2005 n 2009 2005 \le n \le 2009 . The only such pair is (2006, 2007), so the answer is 501 \fbox{501} .

Moderator note:

Nice way to do this problem.

However, you must have miscalculated the quadratic residues: the only pair that has to be excluded is ( 2008 , 2009 ) , (2008,2009), not ( 2006 , 2007 ) (2006,2007) as you claim.

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...