<div dir="ltr"><div class="gmail_default" style="font-family:verdana,sans-serif;font-size:small;color:#333333">ps.<br><br>Further down that twitter stream, there is a math problem presented<br>by the UK mathematics trust. The problem is to find the smallest prime<br>which divides (300^300)-1. Using the ideas in my post above we can<br>see that (300^300)-1 is a very large number:<br><br>136891479058588375991326027382088315966463695625337436471480190078368997177499076593800206155688941388250484440597994042813512732765695774566000999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999<br><br>For those that have learned the 3's trick, we can quickly verify that 3 does</div><div class="gmail_default" style="font-family:verdana,sans-serif;font-size:small;color:#333333">NOT divide this number because the sum of the digits here gives 6092 which</div><div class="gmail_default" style="font-family:verdana,sans-serif;font-size:small;color:#333333">is NOT divisible by 3.<br><br>This is an example of considering the large number above to be a list</div><div class="gmail_default" style="font-family:verdana,sans-serif;font-size:small;color:#333333">of numbers. Next, applying the Pollard Rho method, I quickly found that 7</div><div class="gmail_default" style="font-family:verdana,sans-serif;font-size:small;color:#333333">DOES divide this number. To verify, I use a method similar to the 3's trick</div><div class="gmail_default" style="font-family:verdana,sans-serif;font-size:small;color:#333333">(well really the same) and pop the last 9 off the list, multiply it by 2 and</div><div class="gmail_default" style="font-family:verdana,sans-serif;font-size:small;color:#333333">then subtract it from the remaining list. This gives another really large</div><div class="gmail_default" style="font-family:verdana,sans-serif;font-size:small;color:#333333">number, but iterating through the list eventually gives a much smaller</div><div class="gmail_default" style="font-family:verdana,sans-serif;font-size:small;color:#333333">number that can easily be verified to be divisible by 7. Therefore the</div><div class="gmail_default" style="font-family:verdana,sans-serif;font-size:small;color:#333333">whole number is divisible by 7. Now part of the beauty of the <i>div/mod</i></div><div class="gmail_default" style="font-family:verdana,sans-serif;font-size:small;color:#333333">characterization I mentioned earlier is that we can then arithmetically</div><div class="gmail_default" style="font-family:verdana,sans-serif;font-size:small;color:#333333">define Kronecker deltas for numbers by defining functions that act</div><div class="gmail_default" style="font-family:verdana,sans-serif;font-size:small;color:#333333">on numbers as lists, <a href="https://github.com/jonzingale/Haskell/blob/master/HaskellStudy/Lists/Listable.hs">which I do here</a>.</div><div class="gmail_default" style="font-family:verdana,sans-serif;font-size:small;color:#333333"><br>Techniques like this appear almost everywhere and deltas are a similar</div><div class="gmail_default" style="font-family:verdana,sans-serif;font-size:small;color:#333333">such thing. Consider the Dirac Delta in particular. There we have a</div><div class="gmail_default" style="font-family:verdana,sans-serif;font-size:small;color:#333333">generalized function that is tremendously useful for selecting values out</div><div class="gmail_default" style="font-family:verdana,sans-serif;font-size:small;color:#333333">of a time-series and yet really isn't a function at all.</div><div class="gmail_default" style="font-family:verdana,sans-serif;font-size:small;color:#333333"><br>Jon<br></div></div>