logo

Primes Divisible by 3 with a Remainder of 1: Necessary and Sufficient Conditions 📂Number Theory

Primes Divisible by 3 with a Remainder of 1: Necessary and Sufficient Conditions

Theorem

p3p \ne 3 is a prime number. p1(mod3)p \equiv 1 \pmod{3}     \iff for some a,bZa,b \in \mathbb{Z} p=a2ab+b2p = a^2 - ab + b^2

Description

Though p=3p=3 is excluded, in fact since 3=2221+12 3= 2^2 - 2 \cdot 1 + 1^2, it wouldn’t matter much if it was included in the theorem.

For example, 131(mod4)13 \equiv 1 \pmod{4} is 13=14+16=1214+42 13 = 1 - 4 + 16 = 1^2 - 1 \cdot 4 + 4^2 371(mod4)37 \equiv 1 \pmod{4} is 37=921+49=3237+72 37 = 9 -21 + 49 = 3^2 - 3 \cdot 7+ 7^2 611(mod4)61 \equiv 1 \pmod{4} is 61=1636+81=4249+92 61 = 16 - 36 + 81 = 4^2 - 4 \cdot 9 + 9^2

These facts are interesting in themselves, but also have deep connections with Eisenstein integers, taking number theory to a higher dimension.

Proof

(    )( \implies )

a2+3b2=(a+b)2(a+b)(ab)+(ab)2 a^2 + 3 b^2 = ( a + b )^2 - ( a+ b) ( a - b) + (a - b) ^2 Thus, it suffices to show the existence of a,bZa,b \in \mathbb{Z} that satisfies p=a2+3b2p = a^2 + 3b^2.


Part 1.

Since p1(mod3)p \equiv 1 \pmod{3} is odd, for some kNk \in \mathbb{N}, it can be expressed as p=6k+1p = 6k +1.

Part 1-1. Gauss’s Law of Quadratic Reciprocity

Gauss’s Law of Quadratic Reciprocity: For two different odd numbers p,qp , q,

  • [2]: (pq)(qp)=(1)p12q12\left( {{ p } \over { q }} \right) \left( {{ q } \over { p }} \right) = (-1)^{ { {p-1} \over {2} }{ {q-1} \over {2} } }

By Gauss’s law of quadratic reciprocity, (p3)(3p)=(1)p12312=(1)(6k+1)12=(1)3k=(1)k \begin{align*} \left( { { p } \over { 3 } } \right) \left( { { 3 } \over { p } } \right) =& (-1)^{ { {p-1} \over {2} }{ {3-1} \over {2} } } \\ =& (-1)^{ {{ (6k + 1) - 1 } \over {2}} } \\ =& (-1)^{3k} \\ =& (-1)^{k} \end{align*}

Part 1-2. Euler’s Criterion

Euler’s Criterion: ap12(ap)(modp)a^{{p-1} \over {2}} \equiv \left( {a \over p} \right) \pmod{p}

By Euler’s criterion, (1p)(1)p12(1)k(modp) \left( {{-1} \over {p}} \right) \equiv (-1)^{ {{ p - 1 } \over {2}} } \equiv (-1)^{k} \pmod{p}

Part 1-3. Multiplicative Property of the Legendre Symbol

Multiplicative Property of the Legendre Symbol: For a prime number pp larger than 22, (abp)=(ap)(bp)\left( { ab \over p } \right) = \left( { a \over p } \right) \left( { b \over p } \right)

By the multiplicative property of the Legendre symbol, (3p)=(1p)(3p) \left( { { 3 } \over { p } } \right) = \left( { { -1 } \over { p } } \right) \left( { { -3 } \over { p } } \right) Since p1(mod3)p \equiv 1 \pmod{3}, there must exist x=1x=1 satisfying x2p(mod3)x^2 \equiv p \pmod{3 }, (p3)=1 \left( { { p } \over { 3 } } \right) = 1 Hence, we obtain the following: (p3)(3p)=(1p)(3p) \left( { { p } \over { 3 } } \right) \left( { { 3 } \over { p } } \right) = \left( { { -1 } \over { p } } \right) \left( { { -3 } \over { p } } \right)

Part 1-4.

  • Case 1. If kk is even
    • By Part 1-1, (p3)(3p)=1\displaystyle \left( { { p } \over { 3 } } \right) \left( { { 3 } \over { p } } \right) = 1
    • By Part 1-2, (1p)=1\displaystyle \left( { { -1 } \over { p } } \right) = 1
    • By Part 1-3, 1=1(3p)\displaystyle 1 = 1 \cdot \left( { { -3 } \over { p } } \right)
  • Case 2. If kk is odd
    • By Part 1-1, since (p3)(3p)=1\left( { { p } \over { 3 } } \right) \left( { { 3 } \over { p } } \right) = -1, (p3)=(3p)\displaystyle \left( { { p } \over { 3 } } \right) = - \left( { { 3 } \over { p } } \right)
    • By Part 1-2, since (1p)=1\left( { { -1 } \over { p } } \right) = -1, (p3)=(1p)(3p)=(3p)\displaystyle \left( { { p } \over { 3 } } \right) = \left( { { -1 } \over { p } } \right) \left( { { 3 } \over { p } } \right) = \left( { { -3 } \over { p } } \right)
    • By Part 1-3, 1=(3p)\displaystyle 1 = \left( { { -3 } \over { p } } \right)

In any case, 3-3 is a quadratic residue of pp, and there exists cZc \in \mathbb{Z} satisfying c23(modp)c^{2} \equiv -3 \pmod{p}. Multiplying both sides by B2B^2 and rearranging gives (cB)2+3B20(modp) (cB)^2 + 3 B^2 \equiv 0 \pmod{ p } and, if set A:=(cB)A := (cB), for some MZM \in \mathbb{Z}, A2+3B2=Mp A^2 + 3 B^2 = Mp Also, M=A2+3B2p(p1)2312p=p2p4p<p M = {{ A^2 + 3 B^2 } \over {p}} \le {{ (p-1)^2 - 3 \cdot 1^2 } \over {p}} = p - {{ 2p - 4 } \over {p}} < p thus M<pM < p. By continuously reducing MM to M=1M=1, for some a,bZa,b \in \mathbb{Z}, p=a2+3b2p = a^2 + 3 b^2 can be said.


Part 2. 1r<M1 \le r < M

uA(modM)vB(modM)M2u,vM2 u \equiv A \pmod{M} \\ v \equiv B \pmod{M} \\ - {{M} \over {2}} \le u,v \le {{M} \over {2}} Considering u,vZu,v \in \mathbb{Z} that satisfies (for instance, if M=13M=13 and A10(mod13)A \equiv 10 \pmod{13}, then u3(mod13)u \equiv -3 \pmod{13}, its existence is always assured). Then, since A2+3B2=pMA^2 + 3B^2 = pM in Part 1, u2+3v2A2+3B20(modM) u^2 + 3 v^2 \equiv A^2 + 3 B^2 \equiv 0 \pmod{M} and for some rZr \in \mathbb{Z}, u2+3v2=rMu^2 + 3 v^2 = rM.

Part 2-1. r<Mr < M

r=u2+3v2M(M/2)2+3(M/2)2MM r = {{ u^2 + 3 v^2 } \over {M}} \le {{ (M/2)^2 + 3 (M/2)^2 } \over { M }} \le M Therefore, rMr \le M.

In the case of M=rM = r, the only possibility is when M2=u=v\displaystyle {{M} \over {2}} = \left| u \right| = \left| v \right| , u2+3v2=4u2=4v2=M2 u^2 + 3 v^2 = 4u^2 = 4 v^2 = M^2

  • Here, since M=2uM = | 2u | is even, for some αZ\alpha \in \mathbb{Z}, u=Mα+A=2uα+Au = M \alpha + A = 2 |u| \alpha +A so, uA(mod2)u \equiv A \pmod{ 2 } .
  • Similarly, M=2vM = | 2v | and, for some βZ \beta \in \mathbb{Z}, v=Mβ+B=2vβ+Bv = M \beta + B = 2 |v| \beta +B so, vB(mod2)v \equiv B \pmod{ 2 } .

Summarizing, uu and AA must both be even or odd, and vv and BB must also be either both even or odd. Let’s check if the following equation can be satisfied. A2+3B2=Mp=2up A^2 + 3 B^2 = Mp = 2 |u| p

  • Case 1. Both AA and BB are even
    Since AA is even, u|u| is also even and can be divided by 22. Dividing both sides of A2+3B2=2upA^2 + 3 B^2 = 2 |u| p by 44 yields (A2)2+3(B2)2=(u2)p \left( {{A} \over {2}} \right) ^2 + 3 \left( {{B} \over {2}} \right) ^2 = \left( {{ | u | } \over {2}} \right) p This excessively presupposes A,B,MA,B,M in Part 1. A new A:=(A2)B:=(B2)M:=(u2) A ' := \left( {{A} \over {2}} \right) \\ B ' := \left( {{B} \over {2}} \right) \\ M’ := \left( {{ |u| } \over {2}} \right) should be set and Part 2 started again.
  • Case 2. AA is even, BB is odd
    The left side of A2+3B2=2upA^2 + 3 B^2 = 2 |u| p is odd while the right side is even, so equation A2+3B2=MpA^2 + 3 B^2 = Mp cannot hold.
  • Case 3. AA is odd, BB is even
    The left side of A2+3B2=2upA^2 + 3 B^2 = 2 |u| p is odd while the right side is even, so equation A2+3B2=MpA^2 + 3 B^2 = Mp cannot hold.
  • Case 4. Both AA and BB are odd Let n,mZn,m \in \mathbb{Z}, A:=2n+1A := 2n + 1, B:=2m+1B := 2m +1, A2+3B3=4n2+4n+1+3(4m2+4m+1)=4(n2+n+3m2+3m+1) A^2 + 3 B^3 = 4n^2 + 4n + 1 + 3( 4 m^2 + 4m + 1 ) = 4( n^2 + n + 3 m^2 + 3m + 1) is a multiple of 44. However, since both u| u | and pp are odd, Mp=2upMp = 2 | u | p cannot be a multiple of 44, and equation A2+3B2=MpA^2 + 3 B^2 = Mp cannot hold.

After examining all possible cases, Cases 2 to 4 show that r<Mr < M can be inferred.

Part 2-2. 1r1 \le r

Assuming r=0r = 0, since {0=uA(modM)0=vB(modM)\begin{cases} 0 = u \equiv A \pmod{M} \\ 0 = v \equiv B \pmod{M} \end{cases}, A,BA, B must be a multiple of MM, and A2+3B2A^2 + 3 B^2 must be a multiple of M2M^2. Therefore, MM must be a multiple of pp, but since Part 1 showed M<pM < p, this is impossible. Thus, rr must be larger than 00.

Combining Part 2-1 and Part 2-2, we obtain 1r<M1 \le r < M.


Part 3. Modified Cauchy-Schwarz Inequality

(u2+3v2)(A2+3B2)=u2A2+3v2A2+3u2B2+9v2B2=(u2A2+6uAvB+3v2B2)+(3v2A26uAvB+3u2B2)=(uA+3vB)2+3(uAvB)2 \begin{align*} & (u^2 + 3 v^2) ( A^2 + 3 B^2 ) \\ = & u^2 A^2 + 3 v^2 A^2 + 3 u^2 B^2 + 9 v^2 B^2 \\ = & ( u^2 A^2 + 6uAvB + 3v^2 B^2 ) + ( 3 v^2 A^2 - 6uAvB + 3 u^2 B^2 ) \\ = & ( uA + 3 vB )^2 + 3 ( uA - vB )^2 \end{align*} Meanwhile, 3(uAvB)3(BAAB)0(modM) 3 ( uA - vB ) \equiv 3 ( BA - AB ) \equiv 0 \pmod{M} therefore, 3(uAvB)3 ( uA - vB ) is a multiple of MM. From Part 2, (uA+3vB)AA+3BB0(modM) ( uA + 3 vB ) \equiv AA + 3 BB \equiv 0 \pmod{M} thus, (uA+3vB)( uA + 3 vB ) is a multiple of MM.


Part 4.

Since A2+3B2=MpA^2 + 3 B^2 = Mp and u2+3v2=Mru^2 + 3 v^2 = Mr, (u2+3v2)(A2+3B2)=M2rp (u^2 + 3 v^2) ( A^2 + 3 B^2 ) = M^2 r p Using the modified Cauchy-Schwarz inequality, (uA+3vB)2+3(uAvB)2=M2rp ( uA + 3 vB )^2 + 3 ( uA - vB )^2 = M^2 r p Since (uA+3vB)( uA + 3 vB ) and 3(uAvB)3 ( uA - vB ) from Part 3 are multiples of MM, dividing both sides by M2M^2 yields (uA+3vBM)2+3(uAvBM)2=rp \left( {{ uA + 3 vB } \over {M}} \right)^2 + 3 \left( {{ uA - vB } \over {M}} \right)^2 = r p

With a new A2:=(uA+3vBM)B2:=(uAvBM)M2:=r A_{2} : = \left( {{ uA + 3 vB } \over {M}} \right) \\ B_{2} := \left( {{ uA - vB } \over {M}} \right) \\ M_{2} := r defined, we regain A22+3B22=M2pA_{2}^{2} + 3 B_{2}^{2} = M_{2} p. Thus, such Ak,Bk,MkA_{k}, B_{k}, M_{k} as defined in Parts 1~3 possesses the same properties for kNk \in \mathbb{N}. Since r<Mr < M in Part 2, MkM_{k} decreases with each increment of kk, stopping exactly at M=1M=1.


(    )( \impliedby )

Let the quotient of a,ba,b satisfying p=a2ab+b2p=a^2 - ab + b^2 divided by 33 be n,mn,m.

  • If N0=3k+0N_{0} = 3k + 0, N029k20(mod3) N_{0}^{2} \equiv 9k^2 \equiv 0 \pmod{ 3 }
  • If N1=3k+1N_{1} = 3k + 1, N12(9k2+6k)+11(mod3) N_{1}^{2} \equiv \left( 9k^2 + 6k \right) + 1 \equiv 1 \pmod{ 3 }
  • If N2=3k+2N_{2} = 3k + 2, N02(9k2+12k+3)+11(mod3) N_{0}^{2} \equiv \left( 9k^2 + 12k + 3 \right) + 1 \equiv 1 \pmod{ 3 }

Therefore, for a natural number NN not a multiple of 33 in regard to (mod3)\pmod{3}, any way N21(mod3)N^2 \equiv 1 \pmod{ 3 } is achieved.

From now, let’s consider all possible combinations of aa, bb.

  • Case 00. a=3na= 3n, b=3mb = 3m p=9n29nm+9m2=3(3n23nm+3m2) p = 9 n^2 - 9 nm + 9 m^2 = 3 ( 3 n^2 - 3 nm + 3 m^2) The prime number pp becomes a multiple of 33, thus this combination is impossible.
  • Case 01. a=3na= 3n, b=3m+1b = 3m + 1 p9n23nb+b21(mod3)p \equiv 9 n^2 - 3n b + b^2 \equiv 1 \pmod{ 3 }
  • Case 02. a=3na= 3n, b=3m+2b = 3m + 2 p9n23nb+b21(mod3)p \equiv 9 n^2 - 3n b + b^2 \equiv 1 \pmod{ 3 }
  • Case 11. a=3n+1a= 3n + 1, b=3m+1b = 3m + 1 pa2(3n+1)(3m+1)+b219nm3n3m1+11(mod3)p \equiv a^2 - ( 3n + 1 ) ( 3m + 1) + b^2 \equiv 1 - 9nm - 3n - 3m - 1 + 1 \equiv 1 \pmod{3}
  • Case 12. a=3n+1a= 3n + 1, b=3m+2b = 3m + 2 p=(3n+1)2(3n+1)(3m+2)+(3m+2)2=9n2+6n+19nm6n3m2+9m2+12m+4=3(3n2+3m23nm+2n+4m+1) \begin{align*} p =& (3n+1)^2 - ( 3n + 1 ) ( 3m + 2 ) + (3m+2)^2 \\ =& 9n^2 + 6n + 1 - 9nm - 6n - 3m - 2 + 9m^2 + 12m + 4 \\ =& 3 ( 3n^2 + 3m^2 - 3nm + 2n + 4m + 1 ) \end{align*} The prime number pp becomes a multiple of 33, thus this combination is impossible.
  • Case 22. a=3n+2a= 3n + 2, b=3m+2b = 3m + 2 pa2(3n+2)(3m+2)+n219nm6n6m4+121(mod3) \begin{align*} p \equiv& a^2 - ( 3n + 2 ) ( 3m + 2 ) + n^2 \\ \equiv& 1 - 9nm - 6n - 6m - 4 + 1 \\ \equiv& -2 \\ \equiv& 1 \pmod{3} \end{align*} Reviewing all cases, Case 01, Case 02, Case 11, and Case 22 occur when p1(mod3)p \equiv 1 \pmod{3}, and Case 00, Case 12 do not occur.

See Also