# trajectories in ListPlot[the maximal prime factor of average of twin prime pair]

another sequence on twin primes The maximal prime factor of average of twin prime pair:

n = 100000; averageList = Select[Prime[Range[n]], PrimeQ[# + 2] &] + 1; mpfList = FactorInteger[#][[-1, 1]] & /@ averageList; ListPlot[%]

Why does this diagram look like a series of trajectories?

-
Slightly neater: With[{n = 10^5}, ListPlot[Composition[First, Last, FactorInteger] /@ (1 + Select[Prime[Range[n]], PrimeQ[# + 2] &])]]; – J. M. Dec 11 '10 at 9:59
Could you show us this plot for small n (say n<100)? It would help me to be sure of my interpretation of your code, as I'm not as fluent in Mathematica as I used to be. Thanks. – Matthew Conroy Dec 11 '10 at 18:51
Never mind about the plot, if my answer below is sufficient. – Matthew Conroy Dec 11 '10 at 22:50

The nth twin prime pair appears to be around $c n \log^2 n$ for a constant $c$, large $n$. The largest prime factor of any non-prime $m$ is equal to $n/m'$ where $m'\ge2$. What you see in the plot are approximations of the curves $y=\frac{c}{k} x \log^2 x$ for $k=6,12,24,...$, since the mean of a twin pair is a multiple of 6.
Correct. I was using $cn\log^2n$ as a quick estimate: I couldn't find a good reference for an easily described approximation to the nth twin primes (my standard references do not have this). For the $n$ in your plot, the nth twin prime pair is roughly $1.5 n \log^2 n$, and my answer explained what you were seeing. – Matthew Conroy Dec 12 '10 at 7:21
$n=cf(n)/\log^2f(n), f(n)=cn\log^2f(n)$.Is it accurate to estimate the n−th twin prime as $cn\log^2n$ ? – a boy Dec 12 '10 at 10:50
An accurate estimate is not necessary to explain the phenomenon you are observing. For small $n$, as in your plot, the nth twin prime, for $500\le n \le 10000$, the nth twin prime is certainly between $1.48 n \log^2 n$ and $1.7 n \log^2 n$. A better estimate appears to be $$f(n)=c n \frac{\log^2 n}{ \log \log n}$$ though I'm still not sure this is the true correct estimate. – Matthew Conroy Dec 12 '10 at 18:04
That should be $$f(n)=\frac{cn \log^2 n}{\log \log \log n}$$ – Matthew Conroy Dec 12 '10 at 19:54