Denote by N the number of pairs of positive integers ( n , m ) , such that m < n ≤ 1 0 0 and the polynomial x n + x m + 1 has a root on the unit circle. Find the last three digits of N .
Details and assumptions
A root on the unit circle is a complex root at the distance exactly 1 from the origin.
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.
All correct solutions followed essentially the same strategy, written up with varying degree of clarity and details. This solution was one of several that used a useful and beautiful geometric fact, that three vectors of equal length sum up to zero if and only if their endpoints form an equilateral triangle.
Since the number is on the unit circle, it is of the form e^{ix(pi)} for some x belons to [0,2) . Thus the equation we want to solve is e^{inx(pi)} + e^{imx(pi)} = -1 .
Note that the imaginary part of the equation is 0. Given that both terms on the LHS lie on the unit circle, the only way that their sum is real is if they are negatives or conjugates of each other. But since their sum is nonzero, they cannot be negatives of each other. Hence we obtain that e^{inx(pi)} = e^{(-i)mx(pi)} . . Hence, e^{i(n + m)x(pi)} = 1 .
Also, we can use e^{(-i)nx(pi)} = e^{imx(pi)} to reduce the original equation to e^{inx(pi)} + e^{(-i)nx(pi)} = 2\cos {nx(pi)} = -1
Thus we have 2 possibilities:
e^{inx(pi)} = (-1/2 , (\sqrt{3})/2) = e^{2i(pi/3)} , e^{imx(pi)} = e^{-2i(pi/3)} or, e^{inx(pi)} = e^{-2i(pi/3)} , e^{imx(pi)} = e^{2i(pi/3)}
Case 1 :
nx = 2/3 + 2k , mx = 4/3 + 2l
Hence, for every n>m with the ratio (1 + 3k) : (2 + 3l ) we have a solution.
Case 2 :
nx = 4/3 + 2k , mx = 2/3 + 2l
Hence, for every n>m with the ratio (2 + 3k) : (1 + 3l ) we have a solution.
It can be seen that (n,m) is a valid pair iff
The largest power of 3 in n and m should be equal. This is because 3k+1 and 3k+2 are both not divisible by 3. Hence any power of 3 in m and n should come from the multiplicant of the ratio and should be equal.
On cancelling off the largest power of 3 from both m and n, numbers should leave different remainders with 3.
There are 34 numbers <= 100 which are 1 mod 3 and 33 which are 2 mod 3. These give a total of 33 34 valid (m,n) pairs. There are 11 numbers <=100 which are 3 mod 9 and 11 which are 6 mod 9. These give 11 11 valid pairs. There are 4 numbers <=100 which are 9 mod 27 and 4 which are 18 mod 27. These give 4*4 valid pairs. (54,27) is another valid pair.
Thus the total number of (m,n) pairs which satisfy the conditions is 33 34 + 11 11 + 4*4 + 1 = 1260
Hence , N = 260
Since x m and x n are on the unit circle and sum to -1, they must equal ω and ω 2 in some order, where ω = e x p ( 2 π i / 3 ) . Now let d = g c d ( m , n ) . Then x 3 m = x 3 n = 1 implies x 3 d = 1 . So x d = ω or ω 2 . And it's a root of x m / d + x n / d + 1 , which happens if and only if m / d + n / d ≡ 0 mod 3. It's not hard to see that this is a necessary and sufficient condition on m , n .
Such pairs are all uniquely expressible as ( 3 a b , 3 a c ) where b and c are 1 and 2 mod 3 respectively. Counting these up gives 3 4 ⋅ 3 3 + 1 1 ⋅ 1 1 + 4 ⋅ 4 + 1 ⋅ 1 = 1 2 6 0 .
Since ∣ x ∣ = 1 , then we can assume that x = c i s a . Where a in degrees. So, from the equation, we obtain that :
( c i s a ) n + ( c i s a ) m + 1 = 0 ⟹ c i s a n + c i s a m + 1 = 0 ( cos a n + cos a m + 1 ) + i ( sin a n + sin a m ) = 0 = 0 + i . 0 , implies that :
cos a n + cos a m + 1 = 0 ⟹ 2 cos 2 a n + a m . cos 2 a n − a m + 1 = 0 … … ( 1 ) and sin a n + sin a m = 0 ⟹ 2 sin 2 a n + a m . cos 2 a n − a m = 0 … … ( 2 )
From (2), we obtain that sin 2 a n + a m = 0 o r cos 2 a n − a m = 0 . But, if we input cos 2 a n − a m = 0 to equation (1), we obtain that 1 = 0 , which is completely wrong. Implies that,
sin 2 a n + a m = 0 … … ( 3 )
And, we get two solution for equation (3), that is 2 a n + a m = 3 6 0 k or 3 6 0 k + 1 8 0 . Where k is integer. Then, we divide into 2 cases, that is :
Case 1 : 2 a n + a m = 3 6 0 k ⟹ a n + a m = 7 2 0 k
⟹ cos 2 a n + a m = 1 . Then, subtitute it into the first equation. Then, we obtain : cos 2 a n − a m = 2 − 1 . So, for this one we obtain the solution 2 a n − a m = 3 6 0 l + 1 2 0 or 3 6 0 l + 2 4 0 ⟹ a n − a m = 7 2 0 l + 2 4 0 or 7 2 0 l + 4 8 0 .
From this case, we obtain a n + a m = 7 2 0 k , and a n − a m = 7 2 0 l + 2 4 0 or 7 2 0 l + 4 8 0 . So, add both equation and subtract both equation. We obtain :
a n = 3 6 0 k + 3 6 0 l + 1 2 0 o r 3 6 0 k + 3 6 0 l + 2 4 0 a m = 3 6 0 k − 3 6 0 l − 1 2 0 o r 3 6 0 k − 3 6 0 l − 2 4 0 , then
m n = 3 ( k − l ) − 1 3 ( k + l ) + 1 or 3 ( k − l ) − 2 3 ( k + l ) + 2 , but since k and l are integer. We can assume that k and l both are non - negative or both both non - positive, we can cancel for negative one and positive one because it doesn't affect at all (Because we can set k : k − l , and l : 0 ). And, for both non positive, we can change k : − k and l : − l , such that k and l both positive. So,
n m = m n = 3 ( k − l ) − 1 3 ( k + l ) + 1 or 3 ( k − l ) + 1 3 ( k + l ) − 1 or 3 ( k − l ) − 2 3 ( k + l ) + 2 or 3 ( k − l ) + 2 3 ( k + l ) − 2 , where k and l both non - negative.
Case 2 : 2 a n + a m = 3 6 0 k + 1 8 0 ⟹ a n + a m = 7 2 0 k + 3 6 0
⟹ cos 2 a n + a m = − 1 . Then, subtitute it into the first equation. Then, we obtain : cos 2 a n − a m = 2 1 . So, for this one we obtain the solution 2 a n − a m = 3 6 0 l + 6 0 o r 3 6 0 l + 3 0 0 ⟹ a n − a m = 7 2 0 l + 1 2 0 or 7 2 0 l + 6 0 0 .
From this case, we obtain a n + a m = 7 2 0 k + 3 6 0 , and a n − a m = 7 2 0 l + 1 2 0 or 7 2 0 l + 6 0 0 . So, add both equation and subtract both equation. We obtain :
a n = 3 6 0 k + 3 6 0 l + 2 4 0 or 3 6 0 k + 3 6 0 l + 4 8 0 a m = 3 6 0 k − 3 6 0 l + 1 2 0 or 3 6 0 k − 3 6 0 l − 1 2 0 , then
m n = 3 ( k − l ) + 1 3 ( k + l ) + 2 or 3 ( k − l ) − 1 3 ( k + l ) + 4 , but since k and l are integer. We can assume that k and l both are non - negative or both both non - positive, we can cancel for negative one and positive one because it doesn't affect at all (Because we can set k : k − l , and l : 0 ). And, for both non positive, we can change k : − k and l : − l , such that k and l both positive. So,
n m = m n = 3 ( k − l ) + 1 3 ( k + l + 1 ) − 1 or 3 ( k − l + 1 ) − 1 3 ( k + l ) + 1 or 3 ( k − l ) − 1 3 ( k + l + 1 ) + 1 or 3 ( k − l + 1 ) + 1 3 ( k + l ) − 1 , where k and l both non - negative.
From, both case, since m and n both positive integers, then we implies all of pairs ( n , m ) such that m + n ∣ 3 , where 3 ∤ n and 3 ∤ m , also if 3 ∣ n and 3 ∣ m , then there are c such that 3 c ∣ ∣ n and 3 c ∣ ∣ m , and 3 ∣ 3 c n + 3 c m .
Proof : It's easy to see that, k + l and k − l has the same parity.
if n m = 3 ( odd or even ) − 1 or 1 3 ( odd or even ) − 1 or 1 , then use case 1 , it wil be satisfy, but if
n m = 3 ( even or odd ) − 1 or 1 3 ( odd or even ) − 1 or 1 , then use case 2 , it wil be satisfy. So, proved.
So, now we only find if n ≡ 1 ( m o d 3 ) , then n ≡ 2 ( m o d 3 ) , and n ≡ 2 ( m o d 3 ) , then n ≡ 1 ( m o d 3 ) , where 1 0 0 ≥ n > m ≥ 1 .Since there are 3 3 number that remainder 2 when divide by 3 . And there are 3 4 number that remainder 1 when divide by 3 . So, there are 3 3 . 3 4 = 1 1 2 2 .
Now, the other possibilities are 3 ∣ n and 3 ∣ m , then there are c such that 3 c ∣ ∣ n and 3 c ∣ ∣ m , and 3 ∣ 3 c n + 3 c m . Then, we can list like the first one. That is 1 1 . 1 1 + 4 . 4 + 1 . 1 = 1 3 8
Add them, we obtain : N ≡ 2 6 0 ( m o d 1 0 0 0 )
Supposing that ψ is a complex root of x m + x n + 1 that is on the unit circle, ie ∣ ψ ∣ = 1 . Then ψ m + ψ n + 1 = 0 . Noting that ∣ ψ k ∣ = ∣ ψ ∣ k = 1 , we can say that ψ n and ψ m are also on the unit circle.
These two cannot be equal to 1 or − 1 and still make the above equation equal to 0 , so they must be complex numbers; further, they must be complex conjugates of each other, since there is no imaginary part in their sum. Their real parts must sum to − 1 , but they are equal, being complex conjugates, so their real parts must both be − 2 1 . The constraint of being on the unit circle means that they must be, in some order, equal to 2 − 1 + i 3 , 2 − 1 − i 3 , which are the cubic roots of unity.
Since the cubic roots of unity are involved, we'll use the principal root ω = 2 − 1 + i 3 , with ω 2 = 2 − 1 − i 3 , ω 3 = 1 , ω 2 + ω + 1 = 0 .
Now, we know that either ψ n = ω 2 , ψ m = ω or ψ n = ω , ψ m = ω 2 . This means that ψ n + m = ω 3 = 1 . Since ψ is either a cube root of unity or something of the form 3 k − 1 , n + m must be a multiple of 3 .
This is in fact a sufficient condition, so long as n and m aren't multiples of 3 individually - as long as they aren't, then ω is a root of the equation. This is because ω 3 k + 1 = ω 3 k × ω = ω , and ω 3 k + 2 = ω 2 . Then, if n + m is a multiple of 3 and neither are multiples themselves, then one will be of the form 3 k + 1 and the other will be like 3 k + 2 , so that ω n + ω m + 1 = ω 2 + ω + 1 = 0 as required.
If m and n are multiples of 3 , then this can't be used. What can be done is to change the equation form, like so -
x 6 + x 3 + 1 = ( x 3 ) 2 + ( x 3 ) + 1
This is like x 2 + x + 1 , and shares the fact of having roots on the unit circle. Here you let x 3 = ω , which makes x a ninth root of unity, 9 − 1 .
However, x 9 + x 3 + 1 , although n + m is a multiple of three, doesn't work, as it reduces to ( x 3 ) 3 + ( x 3 ) + 1 , which is like x 3 + x + 1 ; this equation doesn't work as 3 + 1 is not a multiple of 3 . Special consideration needs to be made of these cases, but it can be seen that if n and m are multiples of 3 , then it is necessary to divide out their common factors of 3 and check them then. For example, ( 2 4 , 3 ) reduces to ( 8 , 1 ) which works, but ( 2 4 , 9 ) becomes ( 8 , 3 ) , which doesn't.
Numbers which are of the form 3 k + 1 can be matched with any of the form 3 k + 2 to make ( m , n ) - for example, ( 1 , 2 ) , ( 1 , 5 ) , ( 2 , 4 ) and ( 4 , 5 ) all work. There are 3 4 of the first type under 1 0 0 and 3 3 of the second, so there are 3 3 × 3 4 = 1 1 2 2 combinations.
With numbers that are multiples of 3 , a similar strategy can be used, considering multiples of 3 , 9 , 2 7 and so on separately.
For multiples of 3 , numbers like 3 ( 3 k + 1 ) = 9 k + 3 must be matched with those of 3 ( 3 k + 2 ) = 9 k + 6 . There are 1 1 of each of these under 1 0 0 , so there are 1 1 × 1 1 = 1 2 1 combinations.
For multiples of 9 , numbers like 9 ( 3 k + 1 ) = 2 7 k + 9 must be matched with those of 9 ( 3 k + 2 ) = 2 7 k + 1 8 . There are 4 of each of these under 1 0 0 , so there are 4 × 4 = 1 6 combinations.
For multiples of 2 7 , only one combination is possible - ( 2 7 , 5 4 ) - as any other is too high. Similarly, no combinations exist for 8 1 or any higher power of 3 .
The total number of combinations is therefore 1 1 2 2 + 1 2 1 + 1 6 + 1 = 1 2 6 0 , thus the last three digits are 2 6 0
Since the root like on the unit circle, the root to the equation X^n + X^m + 1 = 0 : "X" can be replaced with X = e^(i * pi * x)
So
(e^(i pi x))^n + (e^(i pi m))^m + 1 = 0, since the imaginary part of the equation is zero, so the sum of the two exponents [ (e^(i pi x))^n, (e^(i pi m))^m ] must be real. They must either must addictive inverse of one another or complex conjugates of one another.
Suppose that they are addictive inverse of one another, then the equation simplifies to 1 = 0 which is absurd. Thus the relationship between the two exponents must be conjugates to one another.
(e^(i pi x))^n = conjugate [ (e^(i pi m))^m ]
Since conjugate of e^(ix) = cosx + isinx
is
cosx - isinx = cos(-x) + i sin(-x) = e^(-ix)
So (e^(i pi x))^n = (e^(-i pi m))^m
Let A = (e^(i pi x))^n, the equation becomes
A + 1/A + 1 =0, solve via quadratic formula: A = -1/2 +/- i * sqrt(3) /2
e^(n * i pi x) = e^(2pi/3 + 2 i *pi * k), (4pi/3 + 4 i *pi * k) , where k is an integer
n * pi * x = 2pi/3 + 2pi * k, 4pi/3 + 2pi * k, cycle of 3
Similarly,
m * pi * x = 4pi/3 + 2pi * k, 2pi/3 + 2pi * k, cycle of 3
[ Note that n * m is real ]
For m such that m mod 3 != 0, any amount of increment of 3 (because cycle 3) yields a value of n ==> n-m=3k
we start with m = 1, we get n = 4, 7, .., 100 << 33 numbers
then m = 2, we get 2, 5, 8, ... 99 << 33 numbers
then m = 4, we get 7, 10, ... 100 << 32 numbers
and so on til m = 97, we get n = 99 << 1 number
and m = 98, we get n = 99 << 1 number
In this case, the total number of such pairs is ( (33+33) + (32+32) + ... (1+1) ) = (1/2) * 2 * 33 * (33+1) = 1122
If m mod 3 = n mod 3 = 0, but n mod 9 != 0 or m mod 9 != 0,
then n mod 9 = 3 and m mod 9 = 6 or vice versa Numbers of n mod 9 = 3, given n<=100 is 11
Numbers of m mod 9 = 6, given m<n<=100 is 11
So in this case 11*11=121
Similarly, if m mod 9 = n mod 9 = 0, but n mod 27 != 0 or m mod 27 != 0,
then n mod 27 = 9 and m mod 27 = 18 or vice versa
Numbers of n mod 27 = 9, given n<=100 is 4
Numbers of m mod 27 = 18, given m<n<=100 is 4
So in this case 4*4=16
Lastly, if mod 27 = n mod 27 = 0, but n mod 81 != 0 or m mod 81 != 0, we get n=54, m=27 as the only solution.
N=1122+121+16+1=1260
First observe that 1, x^n and x^m can be represented as unit vectors. As x^n + x^m + 1 = 0, they must define an equilateral triangle, implying that either x^n = e^(i(2pi/3)) and x^m = e^(i(pi/3)) or vice versa.
let x = e^it. we now have either:
nt = (k)(2pi) + 2pi/3
mt = (l)(2pi) + pi/3
n/m = (3k+2)/(3l+1)
OR
nt = (k)(2pi) + pi/3
mt = (l)(2pi) + 2pi/3
n/m = (3k+1)/(3l+2)
We are thus interested in (n,m) pairs which reduce to a/b where a and b are of opposite congruence (1 and 2, in whatever order) modulo 3.
we can thus let n = (3^j)(a) and m = (3^j)(b), and hammer away.
When j = 0, you have (34)(33) solutions
(there are 34 numbers congruent to 1 mod 3, and 33 congruent to 2 mod 3; each pair corresponds to 1 solution depending on which is larger).
When j = 1, you have (11)(11) solutions
When j = 2, you have (4)(4) solutions
When j = 3, you have 1 solution.
All values of j > 3 have no solutions, pretty obviously.
This gives you a total of 1122 + 121 + 16 + 1 = 1260
"We are thus interested in (n,m) pairs which reduce to a/b where a and b are of opposite congruence (1 and 2, in whatever order) modulo 3." This is not well written: the fraction may reduce, but not the pair. The logic is also slightly murky: it is not explicitly stated that the condition is necessary and sufficient. These are not the shortcomings of the actual solution, just of the way it is written.
Since a root lies on the unit circle, we may assume the root is x = cos θ + i sin θ . Substituting in the original equation, we get: c i s n θ + c i s m θ + 1 = 0 .
By De Moivre's theorem, ( cos n θ + i sin n θ ) + ( cos m θ + i sin m θ ) = 1
Thus, ( cos n θ + cos m θ ) + i ( sin n θ + sin m θ ) = − 1
⇒ cos 2 ( n + m ) θ cos 2 ( n − m ) θ + i sin 2 ( n + m ) θ cos 2 ( n − m ) θ = − 2 1 ( ∗ ) .
Equating real coefficients, we get: sin 2 ( n + m ) θ = 0 ⇒ θ = n + m 2 k π .
Also, cos 2 ( n − m ) θ = − 2 1 ⇒ θ = 3 n − 3 m 4 π ( 3 k ′ + 1 ) .
From the two above relations, n − m n + m = 6 k ′ + 2 3 k ⇒ m n = 3 ( k − 2 k ′ ) − 2 3 ( k + 2 k ′ ) + 2 = 3 r 2 + 1 3 r 1 + 2 for integers r i .
Thus, n ≡ 2 ( m o d 3 ) ; m ≡ 1 ( m o d 3 ) or ( n , m ) when normalized/reduced by a factor of power of 3 , say 3 w , result into numbers of the previously stated form (i.e. n = 3 w ( 3 a + 2 ) , m = 3 w ( 3 b + 1 ) ). The result also holds if ( m , n ) is also of above forms. (depending on step ( ∗ ) )
If w = 0 , number of pairs satisfying { 1 ( m o d 3 ) , 2 ( m o d 3 ) } are 3 4 × 3 3 .
If w = 1 , 2 , 3 , numbers of pairs satisfying are respectively 1 1 2 + 4 2 + 1 . w ≥ 4 doesn't hold.
Thus, total number of pairs is 1 2 6 0 .
Good job!
Can you tell me how if n/m=3k+2/3q+1 implies that n =3^w(3k+2) and so on...
The conditions are equivalent to saying that there exists x such that { x n , x m , 1 } are the three (distinct) cube roots of unity.
Now write:
n = 3 p ν and m = 3 p ^ μ
where p , p ^ , ν , μ are integers and 3 ∣ ν μ .
Then if x is a solution, the fact that 1 = ( x n ) μ = x ν μ ⋅ 3 p and 1 \ne (x^m)^\nu = x^{\nu\mu\cdot 3^\hat p} means that p ^ = p . On the other hand, the fact that 1 = x n + m = x ( ν + μ ) 3 p implies that 3 ∣ ( ν + μ ) .
But conversely, if p ^ = p and 3 ∣ ( ν + μ ) then x = e π / 3 p + 1 is a solution.
Therefore, we can compute N by noting that the number of ( ν , μ ) pairs (such that the conditions are satisfied, including μ < ν ) is 3 3 ∗ 3 4 , 1 1 ∗ 1 1 , 4 ∗ 4 , 1 ∗ 1 respectively for p = 0 , 1 , 2 , 3 (and 0 for p ≥ 4 ). So N = 1 2 6 0 , and the final answer is 2 6 0 .
How do know that we should write n and m as 3^pv and so on?
x^n + x^m + 1 = 0
Because the equation has at least a root r on the unit circle, then we may assume that x = r = e^(iθ) (∵ θ ≠ 0)
As a result, we can get:
r^n + r^m + 1 = 0
e^(iθ n) + e^(iθ m) + 1 = 0
(cos(nθ) + cos(mθ) + 1) + i(sin(nθ) + sin(mθ)) = 0
Then,
sin(nθ) + sin(mθ) = 0 ···· ❶
cos(nθ) + cos(mθ) + 1 = 0 ···· ❷
Consider x = n + m and y = n – m
❶ sin(xθ/2)cos(yθ/2) = 0
Divide into two cases,
If sin(xθ/2) = 0
x = 2kπ/θ
If cos(yθ/2) = 0
y = (2k + 1)π/θ
❷ 2cos(xθ/2)cos(yθ/2) + 1 = 0
If cos(yθ/2)=0,
2cos(yθ/2)*0 + 1 = 1 ≠ 0
Thus this second case is not satisfy. So we have S=2kπ/θ.
Then,
2cos(xθ/2)cos(yθ/2) + 1 = 0
2cos(kπ)cos(yθ/2) + 1 = 0
Since cos(kπ) = ±1, we have:
±2cos(yθ/2) + 1 = 0
cos(yθ/2) = ±½
cos(yθ/2) = cos(±π/3 + k'π)
Let's define θ = απ/3 then,
y = 2(3k' ± 1)/α
n = (3k + 3k' ± 1)/α
m = (3k – 3k' ∓ 1)/α
n = m(3k + 3k' ± 1)/(3k – 3k' ∓ 1) (0 < m < n, k > k' >0)
We may see that (3k + 3k' ± 1)/(3k – 3k' ∓ 1) is not divisible by 3. Then the solution (n, m) is (n/3, m/3). We can get 260 solutions.
Problem Loading...
Note Loading...
Set Loading...
Let r be a root of the polynomial x n + x m + 1 on the unit circle. Then ∣ r ∣ = 1 ⇒ ∣ r m ∣ = ∣ r n ∣ = 1 . Since r n + r m + 1 = 0 and ∣ r m ∣ = ∣ r n ∣ = 1 , we can visualize the equation in an Argand diagram where three vectors of length 1 add up to give 0 , i.e. lining up the three vectors gives an equilateral triangle. Given that one of the vectors is 1 , then r m and r n must be e i ( 3 2 π ) and e i ( 3 4 π ) in some order. So m ar g ( r ) and n ar g ( r ) must be 3 2 π + 2 a π and 3 4 π + 2 b π in some order, where a and b are integers. So either n m or m n is equal to 3 4 π + 2 b π 3 2 π + 2 a π = 2 + 3 b 1 + 3 a . Here, we see that either m and n are congruent to 1 and 2 modulo 3 (in some order), or m and n can both be divided by 3 c (where c is a positive integer) to obtain m ′ and n ′ which are congruent to 1 and 2 modulo 3 (in some order). Note that the first case can be seen as part of the second case, with c = 0 . We also observe that the converse of this is true. As long as m and n can both be divided by 3 c (where c is a non-negative integer) to obtain m ′ and n ′ which are congruent to 1 and 2 modulo 3 (in some order), then we can find the appropriate a and b and thus find an appropriate root r that has modulus 1 . Now we shall calculate how many pairs ( n , m ) fit the conditions.
When c = 0 , there are 3 4 numbers which are 1 ( m o d 3 ) and 3 3 numbers which are 2 ( m o d 3 ) . So there are altogether 3 4 ⋅ 3 3 = 1 1 2 2 pairs. When c = 1 , there are 1 1 ⋅ 1 1 = 1 2 1 pairs. When c = 2 , there are 4 ⋅ 4 = 1 6 pairs. When c = 3 , there is 1 ⋅ 1 = 1 pair. We cannot have c ≥ 4 , so there are altogether 1 1 2 2 + 1 2 1 + 1 6 + 1 = 1 2 6 0 pairs. So N = 1 2 6 0 and the last three digits of N is 2 6 0 .