A previously unnoticed property of prime numbers
For those willing to try this over toy code, I did a (horrible, horrible, I&#x27;m terribly ashamed of it) quick Python snippet to check it out:<p><pre><code>    def primer():
        p = 3
        while True:
            is_prime = True
            for x in xrange(2, p):
                if p % x == 0:
                    is_prime = False
                    break
            if is_prime:
                yield p
            p += 2
    
    give_prime = primer()
    primes = [1, 2]  # had to separate this into 2 lines because Python
    primes.extend([give_prime.next() for x in xrange(9998)])  # so we get 10,000 primes
    primes_dict = {}
    for i in xrange(len(primes) - 1):
        p0 = str(primes[i])[-1]
        p1 = str(primes[i + 1])[-1]
        key = &quot;&quot;.join([p0, &quot;-&quot;, p1])
        try:
            primes_dict[key] += 1
        except:
           primes_dict[key] = 1
    # let&#x27;s delete the 4 outliers from the begining
    del(primes_dict[&quot;1-2&quot;])
    del(primes_dict[&quot;2-3&quot;])
    del(primes_dict[&quot;3-5&quot;])
    del(primes_dict[&quot;5-7&quot;])
    </code></pre>
So long story short, my results over 10,000 primes:<p><pre><code>    In [57]: primes_dict
    Out[57]:
    {&#x27;1-1&#x27;: 365,
     &#x27;1-3&#x27;: 833,
     &#x27;1-7&#x27;: 889,
     &#x27;1-9&#x27;: 397,
     &#x27;3-1&#x27;: 529,
     &#x27;3-3&#x27;: 324,
     &#x27;3-7&#x27;: 754,
     &#x27;3-9&#x27;: 906,
     &#x27;7-1&#x27;: 655,
     &#x27;7-3&#x27;: 722,
     &#x27;7-7&#x27;: 323,
     &#x27;7-9&#x27;: 808,
     &#x27;9-1&#x27;: 935,
     &#x27;9-3&#x27;: 635,
     &#x27;9-7&#x27;: 541,
     &#x27;9-9&#x27;: 379}
</code></pre>
And you can clearly see that the tendency to avoid the same last digit is starting to show, thow those that end in 1 are still not showing it completely. Tried with 100,000 primes but the (horrible) algorithm kinda got stuck so I settled with 10,000 to make this a &quot;quick test&quot;.<p>Before you go, please believe me I&#x27;m sorry for <i>primer()</i> and <i>give_prime</i>. I&#x27;ll try to never do those kind of things again.<p>Edit: I&#x27;ve edited this like 5 times already over little typos and bad transcription mistakes I did all over the place. Should work now.