Same Unit Digit In Different Bases

Find the smallest natural number greater than 3 which has the unit digit of 3 when expressed in base-4, base-5, base-6, base-7, and base-8.

Express your answer in base 10.


The answer is 843.

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

Manuel Kahayon
Jan 23, 2016

When a number is written in base n n , the units digit of the number is the same as the remainder when the number is divided by n n . So, basically, the problem wants us to find a number x x which leaves a remainder of 3 when divided by 4, 5, 6, 7 or 8.

x 3 ( m o d 4 , 5 , 6 , 7 , 8 ) x \equiv 3 \pmod {4, 5, 6, 7, 8}

Since we know that if x n ( m o d a ) x \equiv n \pmod{a} and x n ( m o d b ) x \equiv n \pmod{b} , then x n ( m o d l c m ( a , b ) ) x \equiv n \pmod{lcm(a,b)} ,

x 3 ( m o d l c m ( 4 , 5 , 6 , 7 , 8 ) ) x \equiv 3 \pmod {lcm(4, 5, 6, 7, 8)}

x 3 ( m o d 840 ) x \equiv 3 \pmod {840}

This means x x is of the form 840 k + 3 840k+3 for nonnegative integers k k

Since x = 3 x = 3 when k = 0 k = 0 , then the next smallest integer which satisfies the requirement is 843 \boxed{843} , when k = 1 k = 1

I understand your method, but I think there might be another number that's smaller than the answer because 3 doesn't have to be the last digit

Cong Peter - 4 years, 3 months ago

Log in to reply

3 has to be the last digit. The number leaves a remainder of 1 when divided by 2, and a remainder of 3 when divided by 5. Any such number has to have a last digit of 3, base 10.

Manuel Kahayon - 4 years, 3 months ago

You can Use the python code for solving the problem:

Or even in Haskell:

1
2
main = print $ head $ filter validNum [4..]
    where validNum n = (n `mod` 8 == 3) && (n `mod` 7 == 3) && (n `mod` 6 == 3) && (n `mod` 5 == 3)

Basim Khajwal - 4 years, 4 months ago

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...