Number of Solutions in Z/2027Z

Find the number of 6 6 -tuples ( a 1 , a 2 , a 3 , b 1 , b 2 , b 3 ) ( Z / 2027 Z ) 6 (a_1, a_2, a_3, b_1, b_2, b_3) \in (\mathbb{Z}/2027\mathbb{Z})^6 such that a 1 2 + a 2 2 + a 3 2 = b 1 2 + b 2 2 + b 3 2 ( m o d 2027 ) a_1^2 + a_2^2 + a_3^2 = b_1^2 + b_2^2 + b_3^2 \pmod{2027} holds.


The answer is 34219120973043861.

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

Jon Haussmann
Jan 23, 2018

More generally, let f ( n ) f(n) denote the number of solutions to a 1 2 b 1 2 + a 2 2 b 2 2 + + a n 2 b n 2 0 ( m o d p ) , a_1^2 - b_1^2 + a_2^2 - b_2^2 + \dots + a_n^2 - b_n^2 \equiv 0 \pmod{p}, where p p is a odd prime.

For n = 1 n = 1 , a 1 2 b 1 2 0 ( m o d p ) a_1^2 - b_1^2 \equiv 0 \pmod{p} If b 1 0 ( m o d p ) b_1 \equiv 0 \pmod{p} , then a 1 0 ( m o d p ) a_1 \equiv 0 \pmod{p} . Otherwise, for each nonzero residue b 1 b_1 , there are two solutions a 1 a_1 , so f ( 1 ) = 1 + 2 ( p 1 ) = 2 p 1 f(1) = 1 + 2(p - 1) = 2p - 1 .

Now, assume n 2 n \ge 2 . Then a n 2 b n 2 ( a 1 2 b 1 2 + + a n 1 2 b n 1 2 ) ( m o d p ) . a_n^2 - b_n^2 \equiv -(a_1^2 - b_1^2 + \dots + a_{n - 1}^2 - b_{n - 1}^2) \pmod{p}. By definition, there are f ( n 1 ) f(n - 1) solutions where the right-hand side is 0 modulo p p . For each such solution, there are 2 p 1 2p - 1 solutions in a n a_n and b n b_n , so there are ( 2 p 1 ) f ( n 1 ) (2p - 1) f(n - 1) solutions in this case.

Otherwise, there are p 2 n 2 f ( n 1 ) p^{2n - 2} - f(n - 1) solutions where the right-hand side is nonzero modulo p p ; let the right-hand side be r r . Then ( a n + b n ) ( a n b n ) r ( m o d p ) . (a_n + b_n)(a_n - b_n) \equiv r \pmod{p}. If we set c a n b n c \equiv a_n - b_n , then a n + b n r c 1 ( m o d p ) a_n + b_n \equiv rc^{-1} \pmod{p} . This system has a unique solution in a n a_n and b n b_n .

There are p 1 p - 1 possible values of c c , so there are ( p 1 ) [ p 2 n 2 f ( n 1 ) ] (p - 1)[p^{2n - 2} - f(n - 1)] solutions in this case. Hence, f ( n ) = ( 2 p 1 ) f ( n 1 ) + ( p 1 ) [ p 2 n 2 f ( n 1 ) ] = p f ( n 1 ) + ( p 1 ) p 2 n 2 . \begin{aligned} f(n) &= (2p - 1) f(n - 1) + (p - 1)[p^{2n - 2} - f(n - 1)] \\ &= p f(n - 1) + (p - 1) p^{2n - 2}. \end{aligned}

This gives f ( 2 ) = p 3 + p 2 p f(2) = p^3 + p^2 - p and f ( 3 ) = p 5 + p 3 p 2 f(3) = p^5 + p^3 - p^2 . In particular, for p = 2027 p = 2027 , the answer is 202 7 5 + 202 7 3 202 7 2 = 34219120973043861. 2027^5 + 2027^3 - 2027^2 = 34219120973043861.

@Jon Haussmann , we really liked your comment, and have converted it into a solution. If you subscribe to this solution, you will receive notifications about future comments.

Brilliant Mathematics Staff - 3 years, 4 months ago
Alan Yan
Jan 7, 2018

Observe that p = 2027 p = 2027 is a prime number.

If f n f_n is the number of tuples such that i = 1 3 a i 2 b i 2 = n \sum_{i = 1}^3 a_i^2 - b_i^2 = n , then F ( x ) = n f n x n = a i , b i , i x a 1 2 + a 2 2 + a 3 2 b 1 2 b 2 2 b 3 2 = ( ( a = 0 p 1 x a 2 ) ( b = 0 p 1 x b 2 ) ) 3 . F(x) = \sum_{n} f_n x^n = \sum_{a_i, b_i , i} x^{a_1^2 + a_2^2 + a_3^2 - b_1^2 - b_2^2 - b_3^2} = \left ( \left ( \sum_{a = 0}^{p-1} x^{a^2} \right ) \left ( \sum_{b = 0}^{p-1} x^{-b^2} \right ) \right )^3. If N N is the desired number, then p N = F ( 1 ) + . . . + F ( ζ p 1 ) pN = F(1) + ... + F(\zeta^{p-1}) where we define ζ = e 2 π p i \zeta = e^{\frac{2\pi}{p}i } . Observe that ( a = 0 p 1 ζ k a 2 ) ( b = 0 p 1 ζ k b 2 ) = a , b ζ k ( a 2 b 2 ) . \left ( \sum_{a = 0}^{p-1} \zeta^{ka^2} \right ) \left ( \sum_{b = 0}^{p-1} \zeta^{-kb^2} \right ) = \sum_{a, b} \zeta^{k(a^2 - b^2)}. Now, since the map ( a , b ) ( a + b , a b ) (a,b) \to (a+b, a-b) is bijective in ( Z / p Z ) 2 (\mathbb{Z}/p \mathbb{Z})^2 , this is equal to x , y ζ k x y = { p k 0 p 2 k = 0 \sum_{x,y} \zeta^{kxy} = \begin{cases} p \quad k \neq 0 \\ p^2 \quad k = 0 \end{cases} So, p N = p 6 + p 3 ( p 1 ) N = p 5 + p 2 ( p 1 ) pN = p^6 + p^3(p-1) \implies N = p^5 + p^2(p-1) and we may conclude.

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...