|
EXAMPLE
|
a{2}=75 because the divisors of 75 are 1, 3, 5, 15, 25 and 75, excluding 1 and 75 and concatenating in ascending order yields 351525 which is divisible by 75 (351525/75 = 4687).
|
|
MAPLE
|
divisorCat := proc(upLim, timeLimit, dvc) local s, m, n, d, t, f, startTime, startSet; startTime := time(); s := dvc[1]; m := dvc[2]; for n from s to upLim while time()-startTime<timeLimit do; d := divisors(n); d := d minus {1, n}; if d<>{} then t := ""; for f in d do; t := sprintf("%s%d", t, f); od; if parse(t) mod n = 0 then m := m union {n}; print(n, d, t, parse(t)/n); fi; fi; if n mod 10000=0 then printf("%10.4f secs ... testing %d ", time()-startTime, n) fi; od; [n-1, m]; end;
|