Mathematicians have discovered a surprising pattern in the expression of prime numbers, revealing a previously unknown “bias” to researchers. 
 
 Primes, as you’ll hopefully remember from fourth-grade math class, are numbers that can only be divided by one or themselves (e.g. 2, 3, 5, 7, 11, 13, 17, etc.). Their appearance in the roll call of all integers cannot be predicted, and no magical formula exists to know when a prime number will choose to suddenly make an appearance. It’s an open question as to whether or not a pattern even exists, or whether or not mathematicians will ever crack the code of primes, but most mathematicians agree that there’s a certain randomness to the distribution of prime numbers that appear back-to-back. 
 
 
 
 Advertisement 
 
 Or at least that’s what they thought. Recently, a pair of mathematicians decided to test this “randomness” assumption, and to their shock, they discovered that it doesn’t actually exist. As reported in New Scientist, researchers Kannan Soundararajan and Robert Lemke Oliver of Stanford University in California have detected unexpected biases in the distribution of consecutive primes. 
 
 The mathematicians made the discovery while performing a randomness check on the first hundred million primes. Within that set, a prime ending in 1 is followed by another ending in 1 just 18.5 percent of the time. That shouldn’t happen if they were truly random—we should expect to see this happen 25 percent of the time (keep in mind that primes can only end in 1, 3, 7, or 9). So while this isn’t a pattern—it’s also not totally perfectly random. In terms of the back-to-back distribution of the other numbers, primes ending in 3 and 7 appeared 30 percent of the time, and consecutive 9s appears about 22 of the time. Importantly, this observation has nothing to do with the base-10 numbering system, and is something inherent to primes themselves. 
 
 That’s like, really weird, and certainly unexpected. So what’s going on? According to Soundararajan and Lemke Oliver, it may have something to do with what’s called the k-tuple conjecture—an old idea about how often pairs, triples, and larger sets of primes make an appearance. 
 
 Advertisement 
 
 Spencer Greenberg, a mathematician and founder of ClearerThinking.org, told Gizmodo that the k-tuple conjecture is an attempt to understand the proximity of prime numbers to themselves. “Or more precisely, as we get larger and larger numbers, how often do we see prime numbers that have other primes nearby,” he said. “And it allows you to get very precise about what you mean by ‘nearby’.” For example, Greenberg says mathematicians can study primes that have a fixed spacing to five other primes. Basically, the k-tuple conjecture puts constraints on finding a prime that’s close to another prime. The new study has some interesting things to say about these constraints. 
 
 “As the numbers get larger, though, it sounds like this is less constraining, causing it to get closer and closer to an equal distribution of ending digits— which makes intuitive sense, since the primes get rarer and rarer,” he said. 
 
 
 
 Greenberg said it’s important to remember that primes, like the digits of pi, feel really random, but they’re not random at all. “They are determined precisely by the properties of numbers—it’s just that when we stare at their occurrence, our brains can’t see the pattern, so it feels like random madness.” 
 
 Advertisement 
 
 As fascinating as the new study appears to be, it likely won’t help with other prime-related problems, including the twin-prime conjecture or the Riemann hypothesis. And in fact, this discovery may have no practical use or implications to math and number theory. But as mathematician Andrew Granville told New Scientist, “It gives us more of an understanding, every little bit helps. If what you take for granted is wrong, that makes you rethink some other things you know.” 
 
 [New Scientist, Nature News] 
 
 Email the author at george@gizmodo.com and follow him @dvorsky. ||||| Robert Brook/Getty Images 
 
 Two mathematicians have found a strange pattern in prime numbers — showing that the numbers are not distributed as randomly as theorists often assume. 
 
 “Every single person we’ve told this ends up writing their own computer program to check it for themselves,” says Kannan Soundararajan, a mathematician at Stanford University in California, who reported the discovery with his colleague Robert Lemke Oliver in a paper submitted to the arXiv preprint server on 11 March1. “It is really a surprise,” he says. 
 
 Prime numbers near to each other tend to avoid repeating their last digits, the mathematicians say: that is, a prime that ends in 1 is less likely to be followed by another ending in 1 than one might expect from a random sequence. “As soon as I saw the numbers, I could see it was true,” says mathematician James Maynard of the University of Oxford, UK. “It’s a really nice result.” 
 
 Although prime numbers are used in a number of applications, such as cryptography, this ‘anti-sameness’ bias has no practical use or even any wider implication for number theory, as far as Soundararajan and Lemke Oliver know. But, for mathematicians, it’s both strange and fascinating. 
 
 Not so random 
 
 A clear rule determines exactly what makes a prime: it’s a whole number that can’t be exactly divided by anything except 1 and itself. But there’s no discernable pattern in the occurrence of the primes. Beyond the obvious — after the numbers 2 and 5, primes can’t be even or end in 5 — there seems to be little structure that can help to predict where the next prime will occur. 
 
 As a result, number theorists find it useful to treat the primes as a ‘pseudorandom’ sequence, as if it were created by a random-number generator. 
 
 But if the sequence were truly random, then a prime with 1 as its last digit should be followed by another prime ending in 1 one-quarter of the time. That’s because after the number 5, there are only four possibilities — 1, 3, 7 and 9 — for prime last digits. And these are, on average, equally represented among all primes, according to a theorem proved around the end of the nineteenth century, one of the results that underpin much of our understanding of the distribution of prime numbers. (Another is the prime number theorem, which quantifies how much rarer the primes become as numbers get larger.) 
 
 Instead, Lemke Oliver and Soundararajan saw that in the first billion primes, a 1 is followed by a 1 about 18% of the time, by a 3 or a 7 each 30% of the time, and by a 9 22% of the time. They found similar results when they started with primes that ended in 3, 7 or 9: variation, but with repeated last digits the least common. The bias persists but slowly decreases as numbers get larger. 
 
 The k-tuple conjecture 
 
 The mathematicians were able to show that the pattern they saw holds true for all primes, if a widely accepted but unproven statement called the Hardy–Littlewood k-tuple conjecture is correct. This describes the distributions of pairs, triples and larger prime clusters more precisely than the basic assumption that the primes are evenly distributed. 
 
 The idea behind it is that there are some configurations of primes that can’t occur, and that this makes other clusters more likely. For example, consecutive numbers cannot both be prime — one of them is always an even number. So if the number n is prime, it is slightly more likely that n + 2 will be prime than random chance would suggest. The k-tuple conjecture quantifies this observation in a general statement that applies to all kinds of prime clusters. And by playing with the conjecture, the researchers show how it implies that repeated final digits are rarer than chance would suggest. 
 
 At first glance, it would seem that this is because gaps between primes of multiples of 10 (20, 30, 100 and so on) are disfavoured. But the finding gets much more general — and even more peculiar. A prime’s last digit is its remainder when it is divided by 10. But the mathematicians found that the anti-sameness bias holds for any divisor. Take 6, for example. All primes have a remainder of 1 or 5 when divided by 6 (otherwise, they would be divisible by 2 or 3) and the two remainders are on average equally represented among all primes. But the researchers found that a prime that has a remainder of 1 when divided by 6 is more likely to be followed by one that has a remainder of 5 than by another that has a remainder of 1. From a 6-centric point of view, then, gaps of multiples of 6 seem to be disfavoured. 
 
 Paradoxically, checking every possible divisor makes it appear that almost all gaps are disfavoured, suggesting that a subtler explanation than a simple accounting of favoured and disfavoured gaps must be at work. “It’s a completely weird thing,” says Soundararajan. 
 
 Mystifying phenomenon 
 
 The researchers have checked primes up to a few trillion, but they think that they have to invoke the k-tuple conjecture to show that the pattern persists. “I have no idea how you would possibly formulate the right conjecture without assuming it,” says Lemke Oliver. 
 
 Without assuming unproven statements such as the k-tuple conjecture and the much-studied Riemann hypothesis, mathematicians’ understanding of the distribution of primes dries up. “What we know is embarrassingly little,” says Lemke Oliver. For example, without assuming the k-tuple conjecture, mathematicians have proved that the last-digit pairs 1–1, 3–3, 7–7 and 9–9 occur infinitely often, but they cannot prove that the other pairs do. “Perversely, given our work, the other pairs should be more common,” says Lemke Oliver. 
 
 He and Soundararajan feel that they have a long way to go before they understand the phenomenon on a deep level. Each has a pet theory, but none of them is really satisfying. “It still mystifies us,” says Soundararajan. ||||| Robert Brook/Getty 
 
 Mathematicians are stunned by the discovery that prime numbers are pickier than previously thought. The find suggests number theorists need to be a little more careful when exploring the vast infinity of primes. 
 
 Primes, the numbers divisible only by themselves and 1, are the building blocks from which the rest of the number line is constructed, as all other numbers are created by multiplying primes together. That makes deciphering their mysteries key to understanding the fundamentals of arithmetic. 
 
 Advertisement 
 
 Although whether a number is prime or not is pre-determined, mathematicians don’t have a way to predict which numbers are prime, and so tend to treat them as if they occur randomly. Now Kannan Soundararajan and Robert Lemke Oliver of Stanford University in California have discovered that isn’t quite right. 
 
 “It was very weird,” says Soundararajan. “It’s like some painting you are very familiar with, and then suddenly you realise there is a figure in the painting you’ve never seen before.” 
 
 Surprising order 
 
 So just what has got mathematicians spooked? Apart from 2 and 5, all prime numbers end in 1, 3, 7 or 9 – they have to, else they would be divisible by 2 or 5 – and each of the four endings is equally likely. But while searching through the primes, the pair noticed that primes ending in 1 were less likely to be followed by another prime ending in 1. That shouldn’t happen if the primes were truly random – consecutive primes shouldn’t care about their neighbour’s digits. 
 
 “In ignorance, we thought things would be roughly equal,” says Andrew Granville of the University of Montreal, Canada. “One certainly believed that in a question like this we had a very strong understanding of what was going on.” 
 
 The pair found that in the first hundred million primes, a prime ending in 1 is followed by another ending in 1 just 18.5 per cent of the time. If the primes were distributed randomly, you’d expect to see two 1s next to each other 25 per cent of the time. Primes ending in 3 and 7 take up the slack, each following a 1 in 30 per cent of primes, while a 9 follows a 1 in around 22 per cent of occurrences. 
 
 Similar patterns showed up for the other combinations of endings, all deviating from the expected random values. The pair also found them in other bases, where numbers are counted in units other than 10s. That means the patterns aren’t a result of our base-10 numbering system, but something inherent to the primes themselves. The patterns become more in line with randomness as you count higher – the pair have checked up to a few trillion – but still persists. 
 
 “I was very surprised,” says James Maynard of the University of Oxford, UK, who on hearing of the work immediately performed his own calculations to check the pattern was there. “I somehow needed to see it for myself to really believe it.” 
 
 Stretching to infinity 
 
 Thankfully, Soundararajan and Lemke Oliver think they have an explanation. Much of the modern research into primes is underpinned G H Hardy and John Littlewood, two mathematicians who worked together at the University of Cambridge in the early 20th century. They came up with a way to estimate how often pairs, triples and larger grouping of primes will appear, known as the k-tuple conjecture. 
 
 Just as Einstein’s theory of relativity is an advance on Newton’s theory of gravity, the Hardy-Littlewood conjecture is essentially a more complicated version of the assumption that primes are random – and this latest find demonstrates how the two assumptions differ. “Mathematicians go around assuming primes are random, and 99 per cent of the time this is correct, but you need to remember the 1 per cent of the time it isn’t,” says Maynard. 
 
 The pair used Hardy and Littlewood’s work to show that the groupings given by the conjecture are responsible for introducing this last-digit pattern, as they place restrictions on where the last digit of each prime can fall. What’s more, as the primes stretch to infinity, they do eventually shake off the pattern and give the random distribution mathematicians are used to expecting. 
 
 “Our initial thought was if there was an explanation to be found, we have to find it using the k-tuple conjecture,” says Soundararajan. “We felt that we would be able to understand it, but it was a real puzzle to figure out.” 
 
 The k-tuple conjecture is yet to be proven, but mathematicians strongly suspect it is correct because it is so useful in predicting the behaviour of the primes. “It is the most accurate conjecture we have, it passes every single test with flying colours,” says Maynard. “If anything I view this result as even more confirmation of the k-tuple conjecture.” 
 
 Although the new result won’t have any immediate applications to long-standing problems about primes like the twin-prime conjecture or the Riemann hypothesis, it has given the field a bit of a shake-up. “It gives us more of an understanding, every little bit helps,” says Granville. “If what you take for granted is wrong, that makes you rethink some other things you know.” 
 
 Journal reference: arxiv.org/abs/1603.03720 ||||| Two mathematicians have uncovered a simple, previously unnoticed property of prime numbers — those numbers that are divisible only by 1 and themselves. Prime numbers, it seems, have decided preferences about the final digits of the primes that immediately follow them. 
 
 Among the first billion prime numbers, for instance, a prime ending in 9 is almost 65 percent more likely to be followed by a prime ending in 1 than another prime ending in 9. In a paper posted online today, Kannan Soundararajan and Robert Lemke Oliver of Stanford University present both numerical and theoretical evidence that prime numbers repel other would-be primes that end in the same digit, and have varied predilections for being followed by primes ending in the other possible final digits. 
 
 “We’ve been studying primes for a long time, and no one spotted this before,” said Andrew Granville, a number theorist at the University of Montreal and University College London. “It’s crazy.” 
 
 The discovery is the exact opposite of what most mathematicians would have predicted, said Ken Ono, a number theorist at Emory University in Atlanta. When he first heard the news, he said, “I was floored. I thought, ‘For sure, your program’s not working.’” 
 
 This conspiracy among prime numbers seems, at first glance, to violate a longstanding assumption in number theory: that prime numbers behave much like random numbers. Most mathematicians would have assumed, Granville and Ono agreed, that a prime should have an equal chance of being followed by a prime ending in 1, 3, 7 or 9 (the four possible endings for all prime numbers except 2 and 5). 
 
 “I can’t believe anyone in the world would have guessed this,” Granville said. Even after having seen Lemke Oliver and Soundararajan’s analysis of their phenomenon, he said, “it still seems like a strange thing.” 
 
 Yet the pair’s work doesn’t upend the notion that primes behave randomly so much as point to how subtle their particular mix of randomness and order is. “Can we redefine what ‘random’ means in this context so that once again, [this phenomenon] looks like it might be random?” Soundararajan said. “That’s what we think we’ve done.” 
 
 Prime Preferences 
 
 Soundararajan was drawn to study consecutive primes after hearing a lecture at Stanford by the mathematician Tadashi Tokieda, of the University of Cambridge, in which he mentioned a counterintuitive property of coin-tossing: If Alice tosses a coin until she sees a head followed by a tail, and Bob tosses a coin until he sees two heads in a row, then on average, Alice will require four tosses while Bob will require six tosses (try this at home!), even though head-tail and head-head have an equal chance of appearing after two coin tosses. 
 
 Soundararajan wondered if similarly strange phenomena appear in other contexts. Since he has studied the primes for decades, he turned to them — and found something even stranger than he had bargained for. Looking at prime numbers written in base 3 — in which roughly half the primes end in 1 and half end in 2 — he found that among primes smaller than 1,000, a prime ending in 1 is more than twice as likely to be followed by a prime ending in 2 than by another prime ending in 1. Likewise, a prime ending in 2 prefers to be followed a prime ending in 1. 
 
 Soundararajan showed his findings to postdoctoral researcher Lemke Oliver, who was shocked. He immediately wrote a program that searched much farther out along the number line — through the first 400 billion primes. Lemke Oliver again found that primes seem to avoid being followed by another prime with the same final digit. The primes “really hate to repeat themselves,” Lemke Oliver said. 
 
 Lemke Oliver and Soundararajan discovered that this sort of bias in the final digits of consecutive primes holds not just in base 3, but also in base 10 and several other bases; they conjecture that it’s true in every base. The biases that they found appear to even out, little by little, as you go farther along the number line — but they do so at a snail’s pace. “It’s the rate at which they even out which is surprising to me,” said James Maynard, a number theorist at the University of Oxford. When Soundararajan first told Maynard what the pair had discovered, “I only half believed him,” Maynard said. “As soon as I went back to my office, I ran a numerical experiment to check this myself.” 
 
 Lemke Oliver and Soundararajan’s first guess for why this bias occurs was a simple one: Maybe a prime ending in 3, say, is more likely to be followed by a prime ending in 7, 9 or 1 merely because it encounters numbers with those endings before it reaches another number ending in 3. For example, 43 is followed by 47, 49 and 51 before it hits 53, and one of those numbers, 47, is prime. 
 
 But the pair of mathematicians soon realized that this potential explanation couldn’t account for the magnitude of the biases they found. Nor could it explain why, as the pair found, primes ending in 3 seem to like being followed by primes ending in 9 more than 1 or 7. To explain these and other preferences, Lemke Oliver and Soundararajan had to delve into the deepest model mathematicians have for random behavior in the primes. 
 
 Random Primes 
 
 Prime numbers, of course, are not really random at all — they are completely determined. Yet in many respects, they seem to behave like a list of random numbers, governed by just one overarching rule: The approximate density of primes near any number is inversely proportional to how many digits the number has. 
 
 In 1936, Swedish mathematician Harald Cramér explored this idea using an elementary model for generating random prime-like numbers: At every whole number, flip a weighted coin — weighted by the prime density near that number — to decide whether to include that number in your list of random “primes.” Cramér showed that this coin-tossing model does an excellent job of predicting certain features of the real primes, such as how many to expect between two consecutive perfect squares. 
 
 Despite its predictive power, Cramér’s model is a vast oversimplification. For instance, even numbers have as good a chance of being chosen as odd numbers, whereas real primes are never even, apart from the number 2. Over the years, mathematicians have developed refinements of Cramér’s model that, for instance, bar even numbers and numbers divisible by 3, 5, and other small primes. 
 
 These simple coin-tossing models tend to be very useful rules of thumb about how prime numbers behave. They accurately predict, among other things, that prime numbers shouldn’t care what their final digit is — and indeed, primes ending in 1, 3, 7 and 9 occur with roughly equal frequency. 
 
 Yet similar logic seems to suggest that primes shouldn’t care what digit the prime after them ends in. It was probably mathematicians’ overreliance on the simple coin-tossing heuristics that made them miss the biases in consecutive primes for so long, Granville said. “It’s easy to take too much for granted — to assume that your first guess is true.” 
 
 The primes’ preferences about the final digits of the primes that follow them can be explained, Soundararajan and Lemke Oliver found, using a much more refined model of randomness in primes, something called the prime k-tuples conjecture. Originally stated by mathematicians G. H. Hardy and J. E. Littlewood in 1923, the conjecture provides precise estimates of how often every possible constellation of primes with a given spacing pattern will appear. A wealth of numerical evidence supports the conjecture, but so far a proof has eluded mathematicians. 
 
 The prime k-tuples conjecture subsumes many of the most central open problems in prime numbers, such as the twin primes conjecture, which posits that there are infinitely many pairs of primes — such as 17 and 19 — that are only two apart. Most mathematicians believe the twin primes conjecture not so much because they keep finding more twin primes, Maynard said, but because the number of twin primes they’ve found fits so neatly with what the prime k-tuples conjecture predicts. 
 
 In a similar way, Soundararajan and Lemke Oliver have found that the biases they uncovered in consecutive primes come very close to what the prime k-tuples conjecture predicts. In other words, the most sophisticated conjecture mathematicians have about randomness in primes forces the primes to display strong biases. “I have to rethink how I teach my class in analytic number theory now,” Ono said. 
 
 At this early stage, mathematicians say, it’s hard to know whether these biases are isolated peculiarities, or whether they have deep connections to other mathematical structures in the primes or elsewhere. Ono predicts, however, that mathematicians will immediately start looking for similar biases in related contexts, such as prime polynomials — fundamental objects in number theory that can’t be factored into simpler polynomials. 
 
 And the finding will make mathematicians look at the primes themselves with fresh eyes, Granville said. “You could wonder, what else have we missed about the primes?” 
 
 This article was reprinted on Wired.com.
– Two Stanford mathematicians have managed to surprise others in their field with a previously undiscovered insight about prime numbers: They're not as random as believed. Or, more precisely, there seems to be some order in the way one prime number follows another, reports Quanta Magazine. Start with the basics: Except for 2 and 5, all primes—numbers divisible only by one or themselves—end in 1, 3, 7, or 9. Theoretically, there should be an equal chance of one prime being followed by another that ends in one of those four numbers. But Robert Lemke Oliver and Kannan Soundararajan found that's not the case, reports New Scientist. In looking at the first billion primes, they found that a number ending in 1 follows another ending in 1 about 18% of the time, with different percentages for the rest: 3 (30%), 7 (30%), and 9 (22%). "It was very weird," says Soundararajan. "It’s like some painting you are very familiar with, and then suddenly you realize there is a figure in the painting you’ve never seen before." Others in the field agree. "We’ve been studying primes for a long time, and no one spotted this before," says a number theorist at the University of Montreal. "It’s crazy." The Stanford pair guess this anti-sameness bias is related to something called the "k tuple conjecture," which Gizmodo calls "an old idea about how often pairs, triples, and larger sets of primes make an appearance." (Dig in at Gizmodo or at Nature for more on that.) As for the practical implications of this new discovery, well, the Stanford scientists don't know of any just yet. But the Nature post calls it "both strange and fascinating" for mathematicians, and the University of Montreal professor sums up that sentiment: "You could wonder, what else have we missed about the primes?" (Behold the biggest prime number yet found.)