N is a seven digit base-14 positive integer using the digits 1 to 7 exactly once.
Determine the total number of value(s) of N that are divisible by the base-14 number 16.
base-14 representation decimal
1 2 3 5 4 7 6 8735040
1 2 3 7 4 5 6 8740500
1 2 4 5 3 7 6 8773260
1 2 4 7 3 5 6 8778720
1 2 5 4 7 3 6 8809660
1 2 7 4 5 3 6 8886100
1 3 2 4 5 7 6 9231900
1 3 2 5 7 6 4 9235020
1 3 4 6 7 5 2 9314580
1 3 5 4 2 7 6 9346560
1 3 5 4 6 7 2 9347340
1 3 6 4 5 7 2 9385560
1 3 7 5 2 6 4 9426120
1 3 7 6 4 5 2 9429240
1 4 2 3 5 7 6 9766980
1 4 2 7 5 3 6 9777900
1 4 5 2 7 3 6 9879820
1 4 5 3 2 7 6 9881640
1 4 5 3 6 7 2 9882420
1 4 5 7 2 3 6 9892560
1 4 5 7 6 3 2 9893340
1 4 6 3 5 7 2 9920640
1 4 6 7 5 3 2 9931560
1 4 7 2 5 3 6 9956260
1 5 2 3 7 6 4 10305180
1 5 3 2 4 7 6 10340280
1 5 3 7 6 2 4 10354320
1 5 4 2 3 7 6 10378500
1 5 4 6 7 3 2 10390200
1 5 6 7 3 2 4 10468980
1 5 7 3 2 6 4 10496280
1 5 7 6 4 3 2 10504860
1 6 4 3 7 5 2 10919820
1 6 4 5 7 3 2 10925280
1 6 7 3 4 5 2 11034480
1 6 7 5 4 3 2 11039940
1 7 2 4 5 3 6 11383140
1 7 3 2 4 5 6 11415900
1 7 3 5 6 2 4 11424480
1 7 4 2 3 5 6 11454120
1 7 5 4 2 3 6 11497800
1 7 5 4 6 3 2 11498580
1 7 6 4 5 3 2 11536800
1 7 6 5 3 2 4 11539140
2 1 3 7 5 6 4 15732420
2 1 4 3 7 5 6 15760240
2 1 4 5 7 3 6 15765700
2 1 5 7 3 6 4 15808860
2 1 7 3 4 5 6 15874900
2 1 7 5 4 3 6 15880360
2 3 1 4 5 7 6 16723020
2 3 1 5 7 6 4 16726140
2 3 4 1 7 5 6 16830400
2 3 4 5 7 1 6 16841320
2 3 5 4 1 7 6 16875900
2 3 7 1 4 5 6 16945060
2 3 7 5 1 6 4 16955460
2 3 7 5 4 1 6 16955980
2 4 1 3 5 7 6 17258100
2 4 1 7 5 3 6 17269020
2 4 5 3 1 7 6 17410980
2 4 5 7 1 3 6 17421900
2 5 1 3 7 6 4 17796300
2 5 4 1 7 3 6 17906020
2 5 4 3 7 1 6 17911480
2 5 7 1 4 3 6 18020680
2 5 7 3 1 6 4 18025620
2 5 7 3 4 1 6 18026140
2 7 1 4 5 3 6 18874260
2 7 3 1 5 6 4 18942900
2 7 5 1 3 6 4 19019340
2 7 5 4 1 3 6 19027140
3 1 2 7 5 6 4 23223540
3 1 4 6 5 7 2 23297640
3 1 5 2 7 6 4 23325460
3 1 5 6 4 7 2 23335860
3 1 5 6 7 2 4 23336380
3 1 5 7 2 6 4 23338200
3 1 7 2 5 6 4 23401900
3 1 7 6 5 2 4 23412820
3 2 1 5 4 7 6 23717280
3 2 1 7 4 5 6 23722740
3 2 4 5 1 7 6 23831940
3 2 4 7 1 5 6 23837400
3 2 5 1 7 6 4 23860540
3 2 7 1 5 6 4 23936980
3 5 1 2 4 7 6 25322520
3 5 1 7 6 2 4 25336560
3 5 4 2 1 7 6 25437180
3 5 6 7 1 2 4 25527660
3 6 4 1 5 7 2 25973040
3 6 4 7 5 1 2 25989420
3 6 5 1 4 7 2 26011260
3 6 5 1 7 2 4 26011780
3 6 5 7 4 1 2 26027640
3 6 7 1 5 2 4 26088220
3 7 1 2 4 5 6 26398140
3 7 1 5 6 2 4 26406720
3 7 2 1 5 6 4 26434020
3 7 4 2 1 5 6 26512800
3 7 4 6 5 1 2 26524500
3 7 5 1 2 6 4 26548680
3 7 5 6 4 1 2 26562720
3 7 6 5 1 2 4 26597820
4 1 2 3 7 5 6 30742480
4 1 2 5 7 3 6 30747940
4 1 3 6 5 7 2 30788760
4 1 5 6 3 7 2 30865200
4 1 6 3 7 5 2 30896140
4 1 6 5 7 3 2 30901600
4 1 7 3 2 5 6 30933580
4 1 7 3 6 5 2 30934360
4 1 7 5 2 3 6 30939040
4 1 7 5 6 3 2 30939820
4 2 1 5 3 7 6 31246620
4 2 1 7 3 5 6 31252080
4 2 3 5 1 7 6 31323060
4 2 3 7 1 5 6 31328520
4 3 1 6 7 5 2 31787940
4 3 2 1 7 5 6 31812640
4 3 2 5 7 1 6 31823560
4 3 6 1 7 5 2 31966300
4 3 6 5 7 1 2 31977220
4 3 7 1 2 5 6 32003740
4 3 7 1 6 5 2 32004520
4 3 7 5 2 1 6 32014660
4 3 7 5 6 1 2 32015440
4 3 7 6 1 5 2 32017260
4 5 1 2 3 7 6 32851860
4 5 1 6 7 3 2 32863560
4 5 2 1 7 3 6 32888260
4 5 2 3 7 1 6 32893720
4 5 3 2 1 7 6 32928300
4 5 6 1 7 3 2 33041920
4 5 6 3 7 1 2 33047380
4 5 7 1 2 3 6 33079360
4 5 7 1 6 3 2 33080140
4 5 7 3 2 1 6 33084820
4 5 7 3 6 1 2 33085600
4 5 7 6 1 3 2 33092880
4 6 1 3 7 5 2 33393180
4 6 1 5 7 3 2 33398640
4 6 3 1 5 7 2 33464160
4 6 3 7 5 1 2 33480540
4 6 5 1 3 7 2 33540600
4 6 5 7 3 1 2 33556980
4 6 7 3 1 5 2 33622500
4 6 7 5 1 3 2 33627960
4 7 1 2 3 5 6 33927480
4 7 3 2 1 5 6 34003920
4 7 3 6 5 1 2 34015620
4 7 5 6 3 1 2 34092060
5 1 2 7 3 6 4 38282220
5 1 3 2 7 6 4 38307700
5 1 3 6 4 7 2 38318100
5 1 3 6 7 2 4 38318620
5 1 3 7 2 6 4 38320440
5 1 4 6 3 7 2 38356320
5 1 7 2 3 6 4 38460580
5 1 7 6 3 2 4 38471500
5 2 1 4 7 3 6 38774140
5 2 3 1 7 6 4 38842780
5 2 7 1 3 6 4 38995660
5 2 7 4 1 3 6 39003460
5 3 1 4 2 7 6 39311040
5 3 1 4 6 7 2 39311820
5 3 2 4 1 7 6 39349260
5 3 6 4 1 7 2 39502920
5 4 1 2 7 3 6 39844300
5 4 1 3 2 7 6 39846120
5 4 1 3 6 7 2 39846900
5 4 1 7 2 3 6 39857040
5 4 1 7 6 3 2 39857820
5 4 2 3 1 7 6 39884340
5 4 2 7 1 3 6 39895260
5 4 6 3 1 7 2 40038000
5 4 6 7 1 3 2 40048920
5 4 7 2 1 3 6 40073620
5 6 3 1 4 7 2 40993500
5 6 3 1 7 2 4 40994020
5 6 3 7 4 1 2 41009880
5 6 4 1 3 7 2 41031720
5 6 4 7 3 1 2 41048100
5 6 7 1 3 2 4 41146900
5 7 1 4 2 3 6 41462280
5 7 1 4 6 3 2 41463060
5 7 2 1 3 6 4 41492700
5 7 2 4 1 3 6 41500500
5 7 3 1 2 6 4 41530920
5 7 3 6 4 1 2 41544960
5 7 4 6 3 1 2 41583180
5 7 6 4 1 3 2 41654160
6 1 4 3 7 5 2 45878380
6 1 4 5 7 3 2 45883840
6 1 7 3 4 5 2 45993040
6 1 7 5 4 3 2 45998500
6 3 1 4 5 7 2 46841160
6 3 4 1 7 5 2 46948540
6 3 4 5 7 1 2 46959460
6 3 5 4 1 7 2 46994040
6 3 7 1 4 5 2 47063200
6 3 7 5 4 1 2 47074120
6 4 1 3 5 7 2 47376240
6 4 1 7 5 3 2 47387160
6 4 5 3 1 7 2 47529120
6 4 5 7 1 3 2 47540040
6 5 1 7 3 2 4 47924580
6 5 3 7 1 2 4 48001020
6 5 4 1 7 3 2 48024160
6 5 4 3 7 1 2 48029620
6 5 7 1 4 3 2 48138820
6 5 7 3 4 1 2 48144280
6 7 1 4 5 3 2 48992400
6 7 1 5 3 2 4 48994740
6 7 3 5 1 2 4 49071180
6 7 5 4 1 3 2 49145280
7 1 2 3 4 5 6 53330500
7 1 2 5 4 3 6 53335960
7 1 3 2 5 6 4 53366380
7 1 3 6 5 2 4 53377300
7 1 4 3 2 5 6 53406940
7 1 4 3 6 5 2 53407720
7 1 4 5 2 3 6 53412400
7 1 4 5 6 3 2 53413180
7 1 5 2 3 6 4 53442820
7 1 5 6 3 2 4 53453740
7 1 6 3 4 5 2 53484160
7 1 6 5 4 3 2 53489620
7 2 1 4 5 3 6 53832820
7 2 3 1 5 6 4 53901460
7 2 5 1 3 6 4 53977900
7 2 5 4 1 3 6 53985700
7 3 1 5 2 6 4 54372840
7 3 1 6 4 5 2 54375960
7 3 2 1 4 5 6 54400660
7 3 2 5 1 6 4 54411060
7 3 2 5 4 1 6 54411580
7 3 4 1 2 5 6 54477100
7 3 4 1 6 5 2 54477880
7 3 4 5 2 1 6 54488020
7 3 4 5 6 1 2 54488800
7 3 4 6 1 5 2 54490620
7 3 6 1 4 5 2 54554320
7 3 6 5 4 1 2 54565240
7 4 1 2 5 3 6 54902980
7 4 5 2 1 3 6 55055860
7 5 1 3 2 6 4 55443000
7 5 1 6 4 3 2 55451580
7 5 2 1 4 3 6 55476280
7 5 2 3 1 6 4 55481220
7 5 2 3 4 1 6 55481740
7 5 4 1 2 3 6 55552720
7 5 4 1 6 3 2 55553500
7 5 4 3 2 1 6 55558180
7 5 4 3 6 1 2 55558960
7 5 4 6 1 3 2 55566240
7 5 6 1 4 3 2 55629940
7 5 6 3 4 1 2 55635400
7 6 1 3 4 5 2 55981200
7 6 1 5 4 3 2 55986660
7 6 3 1 5 2 4 56052700
7 6 4 3 1 5 2 56095860
7 6 4 5 1 3 2 56101320
7 6 5 1 3 2 4 56129140
These are the 264 values that satisfy the conditions.
The program:
DEFDBL A-Z
v = 1
FOR pwr = 0 TO 6
psn(pwr) = v
PRINT v
v = v * 14
NEXT
FOR a = 1 TO 7
va = a * psn(6)
used(a) = 1
FOR b = 1 TO 7
IF used(b) = 0 THEN
vb = b * psn(5)
used(b) = 1
FOR c = 1 TO 7
IF used(c) = 0 THEN
vc = c * psn(4)
used(c) = 1
FOR d = 1 TO 7
IF used(d) = 0 THEN
vd = d * psn(3)
used(d) = 1
FOR e = 1 TO 7
IF used(e) = 0 THEN
ve = e * psn(2)
used(e) = 1
FOR f = 1 TO 7
IF used(f) = 0 THEN
vf = f * psn(1)
used(f) = 1
FOR g = 1 TO 7
IF used(g) = 0 THEN
vg = g * psn(0)
used(g) = 1
value = va + vb + vc + vd + ve + vf + vg
IF value MOD 20 = 0 THEN
PRINT a; b; c; d; e; f; g, value
ct = ct + 1
IF ct MOD 45 = 0 THEN
DO: LOOP UNTIL INKEY$ > "": PRINT
END IF
END IF
used(g) = 0
END IF
NEXT
used(f) = 0
END IF
NEXT
used(e) = 0
END IF
NEXT
used(d) = 0
END IF
NEXT
used(c) = 0
END IF
NEXT
used(b) = 0
END IF
NEXT
used(a) = 0
NEXT
PRINT ct
|
Posted by Charlie
on 2010-09-12 14:42:04 |