# Primey Pascal's Triangle

Imagine that we have a triangle that starts with 2,3 and grows like Pascal's triangle but instead uses the smallest prime $\geq$ to the sum of the above two primes. Visually:

$$\begin{array}{ccccccccc} &&& 2 && 3 \\ && 2 && 5 && 3 \\ & 2 && 7 && 11 && 3 \\ 2 && 11 && 19 && 17 && 3 \end{array}$$

Obviously, all primes will be seen in the first diagonal on the left side. However, if we neglect that diagonal, then there are some primes that never appear. The sequence starts: $5,7,13,43,73,103,109,\dots$

One might notice that all of these primes are second members of twin prime pairs. They would be correct. In fact, the diagonal on the right side does capture every prime except for those that are the second prime of a twin prime pair because $p+3$ skips over $p+2$. However...there ARE some hold-outs. There are primes that do not appear in the main body of the triangle, but DO appear in the right side diagonal despite not being a twin prime. In other words, they appear only twice in the entire triangle while having composite odd neighbors. The first few are $23, 53, 79, 83, 131, 157, \dots$.

Is there something special about these primes that explains this curious fact?

-
@Yuval: Thanks. :) – El'endia Starman May 10 '11 at 1:52
Unless I've misunderstood, $23$ also appears only twice (and has composite odd neighbors). – Gerry Myerson May 10 '11 at 3:39
@Gerry: You are correct. My Python code kinda started past the point where that would have come up. Edited. – El'endia Starman May 10 '11 at 3:45

The reason why there are primes which appear at most twice in this triangle array is that its elements grow too fast. Let us denote the set of primes which lie in the main body of the triangle by $P$. It is not hard to show that the elements in the $k$-th (let's say right) diagonal grows like $n^k$ modulo some constant factor.
Given this we can estimate the size of the set $$P\cap \{1,2,\cdots,m\}\sim c_2\sqrt{m}+c_3\sqrt[3]{m}+\cdots \le C\sqrt{m}\log m$$ while it is clear that the number of primes in $\{1,2,\dots,m\}$ is $\sim n/\log n$ by the Prime Number Theorem. So we conclude that asymptotically almost all primes appear only twice in our triangle.