Sunday, 5 April 2015

number theory - Prove that r(255555) divisible by 55



In this question there is a comment by @amclade, that




r(255555)0(mod55),



where r:NN function gives the reverse of a number.



I've checked this using Maple, and the statements seems to be true – verified by a CAS –, but how could we prove it analytically?


Answer



It is easy to check that 55=3125. Note that because 1000000mod3125, the divisibility of a decimal number by 3125 can be checked simply by inspecting the last 5 digits.



So it remains to compute the first 5 digits of 255555. First let's compute the number of digits of this number. This can be done with the computation 55555log102=16724.




This means the relevant digits can be multiplied by 1016719 to approximate the number from below. So our computation becomes 2555551016719, which will spit out the first 5 digits of the number (decimal places can be discarded). Doing a trivial simplification leaves 238836516719.



Computation is inevitable, but only the first 5 significant figures are needed. It is convenient to take the logarithm of this fraction.



log238836516719=38836log216719log5



For good measure, we'll compute this to 10 significant figures. The result is 10.8714462403. Now taking e10.8714462403, we have 52651. Reversing this much smaller number, we identify it as a multiple of 3125 and complete the proof.







The number of computations needed with this approach is much lower than the naive method of exponentiation. A more intelligent means of taking 255555 to 5 decimal places of precision (which is what the above accomplishes) may be more efficient for a computer to do:



255555=2327682163842409622048225622



The computer simply computes 2 to sufficient precision, and squares the number each time. These operations are very fast and the result will be computed very quickly, likely faster than computing logarithms.


No comments:

Post a Comment

real analysis - How to find limhrightarrow0fracsin(ha)h

How to find limh0sin(ha)h without lhopital rule? I know when I use lhopital I easy get $$ \lim_{h\rightarrow 0}...