Defining the Prime Gap function

In summary, the conversation focused on creating a function ##R(x)## that gives the gap between the largest two primes less than or equal to ##x##. The function was defined using the property $$\pi(x+R(x))=\pi(x)+1$$ and it was discussed how to solve for ##R(x)##. The conversation then shifted to discussing resources for learning about analytic number theory and mathematical reasoning, with several links and book recommendations provided.
  • #1
MevsEinstein
124
36
TL;DR Summary
So I was creating a function ##R(x)## such that gives you the gap between the largest two primes less than or equal to ##x##. I was trying to define it using the prime counting function, but I ran into problems
Hi PF!

I created a function ##R(x)## that gives the gap between the largest two primes less than or equal to ##x##. To define it, I used this property: $$\pi(x+R(x))=\pi(x)+1$$ Which is true since the ##x## distance between ##\pi(x)## and ##\pi(x)+1## is ##R(x)##. If we solve for ##R(x)## we get $$R(x) = \pi^{-1}(\pi(x)+1)-x$$ But ##\pi^{-1}(x)## isn't defined since ##\pi(x)## is a step function. Is there any other non-problematic way I can define ##R(x)##?
 
  • Wow
Likes nuuskur
Mathematics news on Phys.org
  • #2
Have you read "Introduction to analytic number theory" by Apostol?
 
  • #3
drmalawi said:
Have you read "Introduction to analytic number theory" by Apostol?
No my library doesn't have it and my dad doesn't want me to buy books. Does it help?
 
  • #6
I asked Wolfram to find the inverse function of ##\frac{x}{\ln (x)}## (which is an approximation for ##\pi (x)##) and it gave me ##-xW(-\frac{1}{x})##. So an approximation for ##R(x)## is ##-(\pi(x)+1)W(-\frac{1}{\pi(x)+1}) - x##
 
  • #8
fresh_42 said:
But it is only a function for ##x>0.##
That's fine since we are only looking at positive integers.
 
  • #9
MevsEinstein said:
That's fine since we are only looking at positive integers.
Yes, but you got ##W(-1/x)## which is a negative argument. If ##x>0## then ##-1/x < 0.##
 
  • #10
fresh_42 said:
If ##x>0## then ##-1/x < 0.##
OH. Well, the inverse prime function actually doesn't exist since ##\pi(x)## is a step function. So now what? Maybe if we think of ##\pi^{-1}## as a set of numbers and take the smallest one then we are fine?
 
  • #11
  • #12
MevsEinstein said:
take the smallest one then we are fine?
Why don't you check for yourself and see if your R(x) gives desired result
 
  • #13
drmalawi said:
Why don't you check for yourself
I don't know how to write the smallest value of ##\pi^{-1}(x)## in set notation. But I did go ahead and graph a few values of ##R(x)##: https://www.desmos.com/calculator/vacrq5jxg1
 
  • Like
Likes Janosh89
  • #14
## \pi^{-1}(x) = \min \left\{ y \in \mathbb{N} \, : \, \pi(y) = x \right\} ##
 
  • #16
drmalawi said:
## \pi^{-1}(x) = \min \lbrace y \in \mathbb{N} \, : \, \pi(y) = x \rbrace ##
Thanks! So $$R(x)= \min \lbrace y \in \mathbb{N} \, : \, \pi(y) = \pi(x) + 1 \rbrace - x$$
 
  • #18
MevsEinstein said:
This is why PF is amazing the people keep giving out resources. TYSM!

I give my advanced and intersted high school students these links. The focus is on teaching how to read, construct and write proofs. Enjoy

“Mathematical reasoning”
https://scholarworks.gvsu.edu/cgi/viewcontent.cgi?article=1024&context=books
more info https://www.tedsundstrom.com/mathematical-reasoning-3

“Book of proof”
https://www.people.vcu.edu/~rhammack/BookOfProof/Main.pdf
more info https://www.people.vcu.edu/~rhammack/BookOfProof/

“A gentle introduction to the art of mathematics”
https://github.com/osj1961/giam/blob/master/GIAM.pdf?raw=true
more info https://osj1961.github.io/giam/

“An introduction to mathematical reasoning”
https://sites.math.washington.edu/~conroy/m300-general/ConroyTaggartIMR.pdf
more info https://sites.math.washington.edu/~conroy/2019/m300-win2019/index.htm

“Proofs and concepts - the fundamentals of abstract mathematics”
https://batch.libretexts.org/print/Finished/math-23870/Full.pdf
more info math.libretexts.org/Bookshelves/Mathematical_Logic_and_Proof/Proofs_and_Concepts

“Elementary Foundations: An Introduction to Topics in Discrete Mathematics”
https://batch.libretexts.org/print/Finished/math-83395/Full.pdf
more info https://math.libretexts.org/Bookshelves/Combinatorics_and_Discrete_Mathematics/Elementary_Foundations

📚📝
 
  • #19
MevsEinstein said:
This is why PF is amazing the people keep giving out resources. TYSM!
Wait until you ask us for homework help. We've got this old-fashioned quirk to teach instead of providing ready-made solutions :cool:
 
  • #20
drmalawi said:
## \pi^{-1}(x) = \min \lbrace y \in \mathbb{N} \, : \, \pi(y) = x \rbrace ##
Thanks! So $$R(x)= \min{y \in \mathbb{N}$$
 
  • #21
drmalawi said:
I give my advanced and intersted high school students these links.
I'm not even in high school yet :-p
 
Last edited:
  • Wow
Likes Janosh89
  • #22
  • #23
MevsEinstein said:
I'm not even in high school yet :-p
Looks to me you think you are in graduate school :)
MevsEinstein said:
I am getting dizzy
hehe yeah, there is lot of stuff, but most of those follow the same format. Pick one and work it through, then pick another and see if there is anything new there. If you master the second pick, you can just browse through the other ones table of contents and see if there is anything there you have not encountered or mastered earlier.
MevsEinstein said:
Thanks! So $$R(x)= \min{y \in \mathbb{N}$$
no idea why you are typing this again
MevsEinstein said:
Thanks! So $$R(x)= \min \lbrace y \in \mathbb{N} \, : \, \pi(y) = \pi(x) + 1 \rbrace - x$$
 
Last edited by a moderator:
  • Haha
Likes MevsEinstein
  • #24
I thought I didn't put the definition for R(x) so I typed it again on accident
 
  • #25
If you're going to use the approximation ##f(x)=x/ln(x)##, then you can just go all the way.

##f'(x)= \frac{\ln(x)-1}{\ln(x)^2}##
An interpretation of this is if you increase ##x## by ##\epsilon##, then ##f(x)## increases by approximately ##f'(x)\epsilon##. So to increase ##f(x)## by 1, you pick ##\epsilon = 1/f'(x)##.

This can be an arbitrarily bad approximation, for example it will never tell you when there are twin primes.
 

FAQ: Defining the Prime Gap function

What is the Prime Gap function?

The Prime Gap function is a mathematical function that calculates the difference between two consecutive prime numbers. It is denoted as g(n) and is defined as g(n) = p(n+1) - p(n), where p(n) is the nth prime number.

How is the Prime Gap function used?

The Prime Gap function is used to study the distribution and patterns of prime numbers. It helps in understanding the gaps between prime numbers and their relationship with other mathematical concepts such as twin primes and prime constellations.

Can the Prime Gap function be negative?

Yes, the Prime Gap function can be negative. This occurs when the difference between two consecutive prime numbers is negative, indicating that the first prime number is larger than the second one.

Is there a limit to the size of the Prime Gap function?

There is no known limit to the size of the Prime Gap function. As the value of n increases, the size of the prime gap can also increase. However, it is believed that the size of the prime gap eventually becomes smaller as n approaches infinity.

What is the largest known prime gap?

The largest known prime gap is 70,000,000. This was discovered in 2014 by mathematicians Tomás Oliveira e Silva, Siegfried Herzog, and Silvio Pardi using a computer program. It is the gap between the 284,724,609th and 284,724,631st prime numbers.

Similar threads

Back
Top