Find the smallest value of hexadecimal positive integer N which becomes 4*N when the last digit of N is moved to be the first. For example, turning (2345)16 into (5234)16. How about 2*N? 7*N? 8*N?
Let the sought after N = Ak, where Ak represents a string of Hex digits.
k is a single Hex digit and A is a string of length m.
Then, 7*(A*16 + k) = k16^m + A
Solving, gives us A = k(16^m - 7)/111
Well, 111 = 3*37, so (16^m - 7) mod 37 must equal 0.
Put a little differently, 16^m = 7, mod 37
A tiny bit of Excel work shows that m = 8 (or 17 or 26).
(16^8 - 7)/37 = 116,080,197 base 10, so that is a candidate for our minimum A.
Happily, it is also divisible by 3, so k need not necessarily be a multiple of 3.
116080197 base 10 = 6EB3E45 base 16, which is only 7 digits.
2*116080197 is also going to be only 7 digits
So our minimum A = 3*116080197 = 348,240,591 base 10 = 14C1BACF base 16
Our initial A was equal to 3*(16^m - 7)/111, but it was not the required 8 digits.
This A = 9*(16^m - 7)/111, so k = 9.
Checking verifies this:
N = 14C1BACF9 base 16 = 5,571,849,465
7 * 5,571,849,465 = 39,002,946,255 = 914C1BACF base 16
Edited on December 23, 2014, 8:59 pm