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?
(In reply to 7*n, analytically
by Steve Herman)
I had also been working on an analytical solution, with some use of inspection. The answer I found was a little smaller.
A hexadecimal number for N can be represented as
Thus, what is sought is where
Let D = 16n-1a0+...+161an-2+160an-1, then
7×(16D + a0) = 16na0 + D, which can be expressed similar to your expression as D = an×(16n-7)/111
Using Excel to iterate through 1 to 15 to find n (which will result in an integer), it is found that n = 8, (or n = 12 : a12 = 6), which gives a8×(38693399).
Thus 7×N = a8×(168 + 38693399) = a8×(4333660695).
Iterating values 1 to 15 for a8 finds the first value where the second digit of 7×N in hexadecimal is not the digit 0 (as a leading 0 digit would not be permitted) is where a8 = 7.
7×N = 30335624865 = 71024E6A116, and
N = 4333660695 = 1024E6A1716.
Edited on December 24, 2014, 8:06 am
Posted by Dej Mar
on 2014-12-24 08:06:23