Make a list of the respective minimum values of a positive base N integer, constituted entirely by threes and zeroes, which is divisible by the base ten number 52032 whenever N is a positive integer with 6 ≤ N ≤ 16.
What are the respective smallest number and the largest number in this list?
list
20 for N=6 to 16
30 V=0
40 for Mult=1 to 10000000
50 V=V+52032
60 Num=V
70 Ns$=""
80 while Num>0
90 Ns$=mid("0123456789ABCDEFGH",(Num @ N)+1,1)+Ns$
100 Num=Num\N
110 wend
120 Good=1
130 for I=1 to len(Ns$)
140 if instr("30",mid(Ns$,I,1))=0 then Good=0:cancel for:goto 160
150 next
160 if Good then:
170 :print N,Mult;V;Ns$
175 :cancel for:goto 200
180 :endif
190 next
200 next
run
6 753057 39183061824 30000033000000
8 503143 26179536576 303033003300
10 640625 33333000000 33333000000
that is:
base multiple representation
N of 52032 base-10 base-N
6 753057 39183061824 30000033000000
8 503143 26179536576 303033003300
10 640625 33333000000 33333000000
Other bases didn't show results, but there may be for higher multiples of 52032 than the 10,000,000 allowed for here.
|
Posted by Charlie
on 2010-03-17 12:41:54 |