Talk:Minimum multiple of m where digital sum equals m: Difference between revisions

m
Line 42:
--[[User:Horst.h|Horst.h]] ([[User talk:Horst.h|talk]]) 14:50, 2 February 2022 (UTC)
 
I think for bigger values turning the task into a problem in combinatorics will be better. Taking 140 simplistically the minimum is 5999999999999999, which obviously is not divisible by 140. The solution is 79999899999999980. So I could try 6+15 digits which sum to 134 then 7+15 digits which sum to 133 until I find a number divisible by 140. Let me call this 15 digit number set N. Note that 6+N will have the same N as 15+N, 24+N, 33+N, 42+N, 51+N, and 60+N. If I optimize this for a particular number the prime factors of 140 are 2,23,5 and 7 from which it follows that the final digit must be 0 and the last but 1 must be even. Which makes the search space very small.--[[User:Nigel Galloway|Nigel Galloway]] ([[User talk:Nigel Galloway|talk]]) 16:21, 2 February 2022 (UTC)
6,951

edits