Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Charasteristic prime function

  1. Apr 18, 2006 #1
    If we define a function a(n) with the next properties, a(n) is 1 iff n is prime and 0 if n is composite..then we can write the function a(n)

    [tex] a(n)=\pi(n+1)-\pi(n) [/tex] where [tex] pi(x) [/tex] is the usual prime number counting function, then my question is to define a b(n) function so b(n)=1 if p and p+2 are primes (twin primes) and 0 elsewhere (no matter if p is prime or not, p and p+2 must be consecutive primes) then my question is if we somehow could write this function in the form:

    [tex] b(n)=\pi(n+2)-2\pi(n+1)+\pi(n) [/tex] here you can check that for composite numbers and normal primes this function is always 0 except if p and p+2 are primes..
  2. jcsd
  3. Apr 18, 2006 #2

    matt grime

    User Avatar
    Science Advisor
    Homework Helper

    b(n) is floor((pi(n)+pi(n+2))/2). But you really ought to learn what the von Mangolt function is.

    Oh, and you keep changing between n and p. Don't. Plus what on earth is a 'normal' prime?
    Last edited: Apr 18, 2006
  4. Apr 19, 2006 #3
    i say i don,t know if the function [tex] b(n)=\pi(n+2)-2\pi(n+1)+\pi(n) [/tex] is correct (that was my question) but you check that for a twin prime p so p+2 is also prime it gives b(p)=1 and 0 elsewhere¿? (i,m not sure) by a normal prime i mean a prime that p is prime but p+2 is not.
  5. Apr 19, 2006 #4


    User Avatar
    Science Advisor
    Homework Helper

    pi(x) is the number of primes less than or equal to x. Your a(n) is off by one, it should be a(n)=pi(n)-pi(n-1).

    Your b(n) is then just a(n+2)-a(n+1), which is clearly not correct. You could use b(n)=a(n)*a(n+2) or b(n)=floor((a(n)+a(n+2))/2) for example (the latter is what matt intended I believe)
  6. Apr 19, 2006 #5
    Supposing [tex] \pi(x) [/tex] is the prime number counting function and from definition of b(n) we get [tex] b(n)=\pi(n+2)-2\pi(n+1)+\pi(n) [/tex]

    -if p and p+2 are primes then b(n)=1
    -if p is prime b(n)=0
    -if p+1 is prime then b(n)=-1
    -if n is composite b(n)=0

    now if we use Abel,s sum formula we would reach to the expression:

    [tex] \sum_{p2}f(p2)+\sum_{p}[f(p-2)-f(p-1)]=(\pi(n+1)-pi(n))f(x)-\int_{2}^{\infty}dx(\pi(x+1)-\pi(x))df(x)/dx+C [/tex]

    where "´" means derivative and C is a constant, p2 is a twin prime so p and (p+2) are primes.
  7. Apr 19, 2006 #6


    User Avatar
    Science Advisor
    Homework Helper

    by your definition of b(n), b(9)=pi(11)-2*pi(10)+pi(9)=5-2*4+4=1. Does this mean you think 9 and 11 are both prime???

    Your b(n) gives a 1 when n+2 is prime and n+1 is composite, -1 when n+2 is composite and n+1 is prime, 0 when both n+2 and n+1 are prime or both are composite. It says nothing about n like you claim it does.
  8. Apr 19, 2006 #7

    matt grime

    User Avatar
    Science Advisor
    Homework Helper

    I must be going blind: there is no need to explain that a ' means derivative, but it doesn't appear anywhere in your post apart from where you state that it siginfies the derivative.
  9. Apr 19, 2006 #8


    User Avatar
    Science Advisor
    Homework Helper

    Perhaps an entirely unrelated remark? :rofl:
  10. Apr 19, 2006 #9
    ups..then there is a mistake then let,s see if now i,m right:
    -iff p+2 and p are primes-------->b(n)=1
    -iff p is prime but p+1 and p+2 are composite b(n)=0
    -iff p+1 is prime then b(n)=-1
    -iff p+2 is prime then b(n)=1

    I hope that now there,s all right of course p and p+1 can,t be both prime
    then we have the identity:

    [tex] \sum_{p2}f(p)+\sum_{p}[f(p-2)-f(p-1)]=a(n)f(n)+C-\int_{2}^{n}dxa(x)(df/dx) [/tex] (1)

    where [tex] a(x)=\pi(x+1)-\pi(x) [/tex]

    but what,s the purpose of all that?..if the relation (1) is right we could prove some statement similars to "twin prime conjecture"..

    -the sum of the inverse of twin primes {p2| p and p+2 are primes} converges whereas its equivalent to normal prime diverge..note that if we set f(x)=1/x+1 then f(x-2)-f(x-1) sum over all prime would diverge as:

    [tex] ln[ln(x-2)/ln(x-1)] [/tex] for x---->oo this is 0

    -there are infinite number of "twin primes" set f(x)=x and you can check that the integral on the right is O(n) for n big this is divergent.

    -Unfortunately for the case f(x)=1 we can,t obtain anything as...

    [tex] \pi2(x)=\sum_{n=2}^{x}(\pi(x+2)-2\pi(x+1)+\pi(x)) [/tex]

    but we don,t know "a priori" if there are infinite number of twin primes that contribute with 1 to the series, taking the difference operator twice for b(n) and letting n--->oo we get that the probability of finding a twin prime is [tex] P=1/(ln(n))^{2} [/tex]

    of course the title is wrong..the formula b(n) couldn,t be considered as a charasteristic function for twin primes....
    Last edited: Apr 19, 2006
  11. Apr 19, 2006 #10


    User Avatar
    Science Advisor
    Homework Helper

    n and n+1 are prime when n=2.

    b(n)=1 has nothing at all to do with n being prime or not. This b(n) has nothing at all to do with twin primes.

    What is this supposed to be? Are these sums supposed to be over an infinite range? Over twin primes and primes respectively I guess? I don't see how this is supposed to follow from Abel summation, if your sum is over primes or twin primes then you should end up with their counting functions on the right.

    Your a(n) is still not the characteristic function of the primes, in case you are still hoping that it is.

    This is false. If n=[x] the sum on the right is pi(n+2)-pi(n+1)-pi(3)+pi(2), which is not at all the counting function for twin pimes.
  12. Apr 20, 2006 #11
    -Sorry i forgot...the detail that n and n+1 are primes if n=2
    -if you see the function [tex] b(n)=\Delta\Delta{\pi(n)} [/tex] where this delta is the forward difference operator then using Abel sum formula:

    [tex] \sum_{n}\Delta^{2}{\pi(x)}f(n)=\Delta{\pi(n)}f(n)-\int_{2}^{n}dx\Delta{\pi(x)}df(x) [/tex]
  13. Apr 20, 2006 #12


    User Avatar
    Science Advisor
    Homework Helper

    Fine, but you haven't answered my question as to what that first sum was supposed to be over. It looks like you mean p2 to be a twin prime, but that isn't what the sum [itex] \sum_{n}\Delta^{2}{\pi(x)}f(n) [/itex] gives (or at least what it looks like you mean, you still can't be bothered to give the range of your summation, and you're apparently using "n" to mean more than one thing), it will just be your second sum, the sum with f(p-2)-f(p-1) in it
  14. Apr 20, 2006 #13
    Sorry...i was wrong :frown: i don,t mean that the relation between the sum of b(n)f(n) by Abel,s sum formula relation is wrong but i think i didn,t consider it well in fact if we redefine:

    [tex] b(n)=\pi(n+1)-2\pi(n)+\pi(n-1)=[\pi(n+1)-\pi(n)]-[\pi(n)-\pi(n-1) [/tex]

    so taking the product b(n)f(n) and summing it for every n we get:

    [tex] \sum_{n=0}^{\infty}(f(n-1)-f(n))(\pi(n)-\pi(n-1))=\sum_{p}(f(p-1)-f(p)) [/tex]

    but from here i don,t know how to associate it to a sum over twin primes...
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Have something to add?

Similar Discussions: Charasteristic prime function