Arturo Magidin wrote: > > In article <3CB37F24.36269B9@kidzmail.com.au>, > Peter Johnson <firstname.lastname@example.org> wrote: > >Hi, > > > >A question we have been asked in our maths class is: find an integer of > >any size, such that, when then last digit becomes the first digit, the > >result is double the original number. > > > >That is, if the initial number is: > > > >ABCDEF > > > >then find a number that is TWICE this number, and has the form > > > >FABCDE > > > >(ABCDEF * 2 = FABCDE) > > > >If anyone can give the initial number that would fit this problem, I > >would be very greatful. > > You are trying to solve the following problem: > > Let x be a number with n digits. Then 2(10x+a) = 10^n*a + x, with > 0<=a<=9. > > so 20x+2a = 10^n*a + x > 19x = (10^n-2)a > > From this you should be able to deduce a number of things. For > example, a must divide 19x, but cannot divide 19, so it must divide > x. 19 must divide 10^n-2, which should give you possible values of n.
"A number of things" including the answer, which follows immediately once you find n ( 17 works ) and evaluate s = (10^n-2)/19. Then values of a = 2 thru 9 give solutions. ( a=1 requires 10*x+a to be expressed with a leading 0 )