Defining the Prime Gap function

  • Context: Undergrad 
  • Thread starter Thread starter MevsEinstein
  • Start date Start date
  • Tags Tags
    Function Gap Prime
Click For Summary

Discussion Overview

The discussion revolves around defining the prime gap function ##R(x)##, which represents the gap between the largest two primes less than or equal to a given number ##x##. Participants explore various mathematical properties, approximations, and potential definitions related to this function, touching on concepts from analytic number theory.

Discussion Character

  • Exploratory
  • Technical explanation
  • Mathematical reasoning

Main Points Raised

  • One participant proposes the definition of ##R(x)## based on the property $$\pi(x+R(x))=\pi(x)+1$$, but notes the challenge of defining ##\pi^{-1}(x)## due to its step function nature.
  • Another participant suggests using an approximation for ##\pi(x)## and derives an expression involving the Lambert W-function, although they acknowledge limitations regarding the function's domain.
  • There is a discussion about the non-existence of an inverse prime function due to the step nature of ##\pi(x)##, leading to the idea of defining ##\pi^{-1}## as a set of numbers to find the smallest one.
  • Participants share resources and books related to analytic number theory and mathematical reasoning, indicating a collaborative effort to enhance understanding of the topic.
  • One participant expresses uncertainty about how to write the smallest value of ##\pi^{-1}(x)## in set notation, while another provides a clear definition.
  • There is a mention of the limitations of the approximation ##f(x)=x/\ln(x)##, particularly in relation to identifying twin primes.

Areas of Agreement / Disagreement

Participants do not reach a consensus on the best way to define ##R(x)##, and multiple competing views and approaches are presented throughout the discussion.

Contextual Notes

Participants note the challenges posed by the step function nature of ##\pi(x)## and the implications for defining inverse functions. The discussion also highlights the limitations of approximations in accurately representing prime gaps.

Who May Find This Useful

This discussion may be of interest to those studying number theory, particularly in the context of prime numbers and their properties, as well as students seeking resources for learning mathematical reasoning and proof construction.

MevsEinstein
Messages
124
Reaction score
36
TL;DR
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   Reactions: 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   Reactions: 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   Reactions: 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   Reactions: 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.
 

Similar threads

  • · Replies 4 ·
Replies
4
Views
3K
  • · Replies 2 ·
Replies
2
Views
2K
Replies
8
Views
2K
  • · Replies 6 ·
Replies
6
Views
2K
  • · Replies 9 ·
Replies
9
Views
2K
Replies
4
Views
2K
  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 26 ·
Replies
26
Views
1K
  • · Replies 4 ·
Replies
4
Views
4K