A duodecimal positive integer N consists of a string of sevens, that is, N = 77777.....7777 (base 12) such that N is divisible by the base 12 number 147.
Reading left to right, determine the last four duodecimal digits of the quotient.
For an extra challenge, solve this problem without using a computer program.
With 66 (decimal) 7's, the quotient has 64(decimal) base-12 digits. The last four are 5791, as the whole quotient is 5638726A290343144689475570497623298B68085062BB01AA865A79982A5791.
Subsequent values that work are all those that consist of a multiple of 66 7's. The successive values of the quotient all are derived from the previous by tacking on 66 digits, consisting of two zeroes followed by the above mentioned 64 digits of the smallest answer. As such, all end with 5791.
5 dim Dig(150)
10 for X=1 to 150
20 Num=7*(12^X-1)//11
30 if Num @ 199=0 then print:print X
40 :Q=Num//199
45 :Ct=0
50 :while Q>0
60 :D=Q @ 12:Q=Q\12
70 :Dig(Ct)=D:Ct=Ct+1
80 :wend:print Ct
90 :for I=Ct-1 to 0 step -1:print mid("0123456789AB",Dig(I)+1);:next:print
140 next
66
64
5638726A290343144689475570497623298B68085062BB01AA865A79982A5791
132
130
5638726A290343144689475570497623298B68085062BB01AA865A79982A5791005638726A290343144689475570497623298B68085062BB01AA865A79982A5791
|
Posted by Charlie
on 2010-06-23 12:26:17 |