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
    @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...