# Hamlet to be or not to be in Primes?

It is conjectured that, if you read $\pi$ long enough you'll find Hamlet. Since other numbers, like the Copeland–Erdős constant are known to be normal in base $10$, it should be true at least there. I wondered, if it also possible to find Hamlet or something else in the sequence of halved differences of subsequent primes: $$L_k = \frac{p_{k}-p_{k-1}}{2} \bmod 26$$ ($k>2$ for the nit-pickers ;-). This gives a sequence of number from $0$ to $25$, that one maps to the letters of the alphabet. I checked the first million, but I couldn't even find my username. So before wasting more time, can one show Hamlet to be or not to be in Primes?

This might boil down to the question, if we get enough 'A's, i.e. are there infinitely many twin primes, but maybe Hamlet or at least my username comes before the very last if there is one...

• It is not known that $\pi$ is normal, and I'm pretty sure that it is also not know that your sequence is normal either, since this is pretty hard to prove. – vadim123 May 4 '13 at 22:47
• The statement about $\pi$ is actually not known to be true - there is no current proof that $\pi$ contains all possible sequences of digits in any particular base. – Thomas Andrews May 4 '13 at 22:47
• To get an "A", you just need the halved difference to be $1$ modulo 26, which is much weaker than being exactly $1$. – Joel Cohen May 4 '13 at 22:48
• @JoelCohen right good for me... and Hamlet! – draks ... May 4 '13 at 22:49
• The distribution of $L_k$ is certainly expected to be random in the long run, but I think very little has been proved about that. – Greg Martin May 22 '13 at 21:45

The answer is NO. Almost any contiguous fragment of the play will do, so let's use “The slings and arrows of outrageous fortune”, or numerically 20 8 5 19 12 9 14 7 19 1 14 4 1 18 18 15 23 19 15 6 15 21 20 18 1 7 5 15 21 19 6 15 18 20 21 14 5. Doubling these determines the spacings modulo 52, and hence also modulo 13, which are:

$1,3,10,12,11,5,2,1,12,2,2,8,2,10,10,4,7,12,4,12,4,3,1,10,2,1,10,4,3,12,12,4,10,1,3,2,10.$

The partial sums of this table modulo 13 are

$\color{red}1, \color{red}4, 1, \color{red}0, \color{red}{11}, \color{red}3, \color{red}5, \color{red}6, 5, \color{red}7, \color{red}9, 4, 6, 3, 0, 4, 11, \color{red}{10}, 1, 0, 4, 7, \color{red}8, 5, 7, 8, 5, 9, \color{red}{12}, 11, 10, 1, 11, 12, \color{red}2, 4, 1,$

which contains a complete system of residues mod $13$. Aye, there's the rub. For, in that sequence encoding this phrase, what remainders may occur, when we have cast off multiples of $13$, must give us zero. This will not be prime unless it is very small (in the first few letters of the sequence).

As you can see, the sequence of prime gaps is not normal. For similar reasons you won't find AAAAAAAAAAAA anywhere. On the other hand, Shiu proved that there are arbitrarily long strings of consecutive primes all lying in the same congruence class mod $n$ (one can even prescribe the congruence class). Therefore we can find strings of ZZZZZZZZZZZZ, as long as devoutly to be wished. To sleep, perchance to dream...

• +1 thanks. Psychological question: What does the example chosen, "The slings and arrows of outrageous fortune" tell us about your inner self? Good nite... – draks ... May 31 '13 at 7:35