3
$\begingroup$

Is there a function that gives the frequency with which twin primes less than a particular number, N (assuming N is not a part of a twin prime) occur? I've tried with a program but I did not notice any pattern........

:

   int pc(long double n)   \\pc:prime check  {  long double i=2, f=0;  for(;i<=n/2;i++)  {  if(fmod(n,i)==0){f=1;break;}  else;  }  if(f)return 0;  else return 1;  }    int sc(int n)   \\sc:square check  {  if(fmod(sqrt(n),1)==0)return 1;  else return 0;  }    void main()  {  long double i=1,n=1000;  cout<<"n\t\t6n-1\t\t6n+1\t\tRem.";  for(;i<=n;i++)  {   cout<<"\n"<

:

  • 2
    As it is still open whether there are infinitely many twin primes, it does not really make sense to speak of a frequency.2012-08-09
  • 0
    Suppose t and t+2 are primes. Can we tell when will the next twin prime occur? This is what I meant.2012-08-09
  • 1
    We can not even be sure that a next twin prime will occur at all.2012-08-09
  • 0
    [Brun's constant and theorem](http://en.wikipedia.org/wiki/Brun's_theorem) should help,2012-08-09
  • 1
    @SwapnanilSaha: the problem is that if there are only finitely many twin primes, there is a value of *t* for which the answer is "never". We can only answer your question as stated if we know if there are infinitely many twin primes. Perhaps you want to know if there are any known results up to some particular finite constant *N* (*e.g.* twin primes up to 1E20)?2012-08-09
  • 0
    @ Tobias:But there are many t's for which it will occur...Or you insist we must not worry about them too?2012-08-09
  • 0
    @Niel de Beaudrap: Yes, is there any?2012-08-09
  • 2
    @SwapnanilSaha: Perhaps you should revise your question so that everyone knows that this is what you have in mind, and not something which requires a solution to the twin primes problem. ;-)2012-08-09

1 Answers 1

5

If $\pi_2(x)$ is the number of primes $p\le x$ with $p+2$ prime then it is conjectured that : $$\pi_2(x)\sim 2C_2 \frac x{(\log x)^2}$$ with $C_2\approx 0.660161815$ the Twin prime constant

This $\pi_2(x)$ function is less well known than $\pi(x)$ of course...