Find the smallest prime which cannot be written as
∣ 3 a − 2 b ∣
where a and b are non-negative integers.
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.
For the second case, you can simplify it by observing that 2 b ≥ 4 1 ⇒ b ≥ 6 . Taking ( m o d 8 ) , we get that − 3 a ≡ 1 ( m o d 8 ) which has no solution.
Log in to reply
@Calvin Lin : Emm I dont understand. Why isn't 2 an answer. 3 a ≡ 1 ( m o d 2 ) and 2 b ≡ 0 ( m o d 2 ) so 3 a − 2 b ≡ 1 ( m o d 2 ) which says 2 can never be of the form 3 a − 2 b . Anything wrong with my answer??
Log in to reply
3 1 − 2 0
So, the place where you made an error is in saying that 2 b ≡ 0 ( m o d 2 ) .
I think this solution is legit. Nice job @Nathan Ramesh
@Finn Hulse - Your proof??
Superb!! How do you find out when and what mod to take?? Also, did you do it for all the primes before 41 also?? @Nathan Ramesh
Problem Loading...
Note Loading...
Set Loading...
As Finn already showed, all primes up to 37 work. It is left to prove that 41 doesn't work.
One very important number theory rule is: "If you can't do anything, take mod everything!" -Nathan Ramesh 2014
Applying that rule to this problem there are two cases:
It is clear that a ≥ 1 , so we can safely say that 3 a ≡ 0 ( m o d 3 ) . From here we can take ( m o d 3 ) to get that − 2 b ≡ 4 1 ≡ 2 ( m o d 3 ) ⟹ 2 b ≡ 1 ( m o d 3 ) . Checking values of 2 b ( m o d 3 ) we see that 2 b ≡ 1 ( m o d 3 ) ⟺ b ≡ 0 ( m o d 2 ) . Thus we can set b = 2 k ⟹ 2 b = 2 2 k = ( 2 k ) 2 . Let's leave this aside for now and go back to our original equation. It is clear that b ≥ 2 , so we can safely say that 2 b ≡ 0 ( m o d 4 ) . From here we can take ( m o d 4 ) to get that 3 a ≡ 4 1 ≡ 1 ( m o d 4 ) . Checking values of 3 a ( m o d 4 ) we see that 3 a ≡ 1 ( m o d 4 ) ⟺ a ≡ 0 ( m o d 2 ) . Thus we can set a = 2 j ⟹ 3 a = 3 2 j = ( 3 j ) 2 . Now we can see where we're getting. We have ( 3 j ) 2 − ( 2 k ) 2 = 4 1 ⟹ ( 3 j − 2 k ) ( 3 j + 2 k ) = 4 1 . Clearly, since 4 1 is prime and 3 j + 2 k = 1 , we must have 3 j − 2 k = 1 and 3 j + 2 k = 4 1 . Adding these equations and dividing by 2 gives 3 j = 2 1 which clearly isn't possible. Thus this case has no solutions. □
It is clear that a ≥ 1 , so we can safely say that 3 a ≡ 0 ( m o d 3 ) . From here we can take ( m o d 3 ) to get that 2 b ≡ 4 1 ≡ 2 ( m o d 3 ) . Checking values of 2 b ( m o d 3 ) we see that 2 b ≡ 2 ( m o d 3 ) ⟺ b ≡ 1 ( m o d 2 ) . This will be important later, so keep it in mind. It is clear that b ≥ 2 , so we can safely say that 2 b ≡ 0 ( m o d 4 ) . From here we can take ( m o d 4 ) to get that − 3 a ≡ 4 1 ≡ 1 ( m o d 4 ) ⟹ 3 a ≡ 3 ( m o d 4 ) . Checking values of 3 a ( m o d 4 ) we see that 3 a ≡ 3 ( m o d 4 ) ⟺ a ≡ 1 ( m o d 2 ) . Since we still aren't done, let's try another mod. Let's try 8 . We have 2 b − 3 a ≡ 1 ( m o d 8 ) . Values of 2 b ( m o d 8 ) are 1 , 2 , 4 , 0 , 0 , 0 , ⋯ . Values of 3 a ( m o d 8 ) are 1 , 3 , 1 , 3 , 1 , 3 , ⋯ . However, since we know that a ≡ 1 ( m o d 2 ) we must have 3 a ≡ 3 ( m o d 8 ) . Thus we now have 2 a − 3 ≡ 1 ( m o d 8 ) ⟹ 2 a ≡ 4 ( m o d 8 ) ⟹ a = 2 . However, a = 2 won't work because we have a ≡ 1 ( m o d 2 ) . Thus this case also has no solutions. □
Since we have exhausted both cases, we are done (whew!) Q . E . D .