I Defining the Prime Gap function

  • I
  • Thread starter Thread starter MevsEinstein
  • Start date Start date
  • Tags Tags
    Function Gap Prime
AI Thread Summary
The discussion centers around defining the prime gap function R(x), which represents the gap between the largest two primes less than or equal to x. The initial formulation of R(x) relies on the inverse prime function, but participants note that this function is problematic due to the step nature of π(x). A proposed solution involves approximating R(x) using the Lambert W-function, though concerns arise regarding negative arguments in this context. Participants also share various resources for studying analytic number theory and mathematical reasoning, emphasizing the importance of foundational knowledge in these areas. The conversation highlights the collaborative nature of mathematical inquiry and resource sharing among participants.
MevsEinstein
Messages
124
Reaction score
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
Have you read "Introduction to analytic number theory" by Apostol?
 
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?
 
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##
 
fresh_42 said:
But it is only a function for ##x>0.##
That's fine since we are only looking at positive integers.
 
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.
 
Back
Top