5
$\begingroup$

I was having fun with Sage when I noticed something interesting:

primes = [p for p in range(500) if p in Primes()]
primes_rev = [p for p in reversed(primes)]
sum = map(operator.add, primes, primes_rev)
mul = map(operator.mul, primes, primes_rev)
sub = map(operator.sub, primes, primes_rev)
div = map(operator.div, primes, primes_rev)

We create a list of prime numbers, primes. We reverse the list, primes_rev. We create new lists from applying math operations to each element of both lists, sum, mul, sub, div. Then we plot the new lists.

list_plot(sum)

enter image description here

list_plot(mul)

enter image description here

list_plot(sub)

enter image description here

list_plot(div)

enter image description here

Does this say anything about prime numbers?

  • 3
    Interesting pictures, nice to look at and search for meaning. Nowadays, computer experimentation is being used a fair bit to generate plausible conjectures. In this case, you will see if you try that similar plots can be obtained from using most sequences which do not grow too fast. You might for instance repeat with $a_n=n/\log(n)$. The striking picture for mul is basically the general shape of $y=x(N-x)$. The picture for sum is interesting.2011-08-04
  • 2
    I agree with André. The overall trends are just what you'd expect from any sequence of numbers that grows slightly faster than linearly. For example, [here's your second plot for if the $n$th entry were $n \log n$](http://www.wolframalpha.com/input/?i=plot+%28x+log+x%29+*+%28%28100+-+x%29+log+%28100+-+x%29%29+for+x+%3D+0+to+100); try replacing the multiplication with the other operators and see that you get essentially the same shape as your graphs.2011-08-04
  • 1
    Speaking of the overall trend, are you aware of the [prime number theorem](http://en.wikipedia.org/wiki/Prime_number_theorem)?2011-08-04
  • 0
    @Rahul Narain: Would you care to answer? I think that (apart from the first sentence!) your comment would be a good answer.2011-08-04
  • 0
    I was aware that different sequence of numbers produce similar plots, but to me the `sum` and `mul` plots using prime numbers stand out.2011-08-04
  • 0
    What are the features that stand out to you?2011-08-04
  • 0
    It would be easier to understand this if you just told us what the code is doing rather than giving us the code.2011-08-04
  • 0
    @Michael I do explain what the code is doing.2011-08-04
  • 0
    @Ben a non-prime number sequence, for example, will produce a _smooth_ curve for `mul`. iirc, non-primes produce a straight line for `sum`. For all non-prime cases the pattern in the sequence was obvious.2011-08-04
  • 0
    @Arlen Try a non-prime sequence that like the primes has some "noise," i.e. rate of growth not smooth. E.g. try something randomish that has a similar growth rate to the primes. I would expect the picture to look similar.2011-09-02
  • 0
    @Ben Indeed, I have done just that and it does produce similar results. But, IMO, a prime sequence still produce something unique (i.e., there seems to be a pattern).2011-09-03

0 Answers 0