What is a good graphing program and code to graph $F(x)=\prod_{p \leq x} \frac{p-1}{p}$ where the product is taken over all primes $p \leq x$ and $x$ is an integer? I have been doing research on this an have come up with inconclusive results. I am mostly looking for something that is simple (online and does not need to be downloaded) but gets the job done. Nonetheless, if there is not such a program, please try to specify with Python, if possible.
2026-03-29 21:55:22.1774821322
Bumbble Comm
On
What is a good graphing program and code to graph $F(x)=\prod_{p \leq x} \frac{p-1}{p}$ for prime $p$.
116 Views Asked by Bumbble Comm https://math.techqa.club/user/bumbble-comm/detail At
2
There are 2 best solutions below
0
Bumbble Comm
On
I suggest PARI/GP in a browser. Use this code
F(x)=prod(n=1,primepi(x),1-1/prime(n));
plot(x=10,200,F(x))
to define and plot your function. If you run the
program locally with graphics enabled you can replace
plot with ploth to get a high resolution plot.
This can be saved in a graphics format such as PDF.
Related Questions in PRIME-NUMBERS
- New prime number
- Confirmation of Proof: $\forall n \in \mathbb{N}, \ \pi (n) \geqslant \frac{\log n}{2\log 2}$
- How do I prove this question involving primes?
- What exactly is the definition of Carmichael numbers?
- I'm having a problem interpreting and starting this problem with primes.
- Decimal expansion of $\frac{1}{p}$: what is its period?
- Multiplying prime numbers
- Find the number of relatively prime numbers from $10$ to $100$
- A congruence with the Euler's totient function and sum of divisors function
- Squares of two coprime numbers
Related Questions in SOFT-QUESTION
- Reciprocal-totient function, in term of the totient function?
- Ordinals and cardinals in ETCS set axiomatic
- Does approximation usually exclude equality?
- Transition from theory of PDEs to applied analysis and industrial problems and models with PDEs
- Online resources for networking and creating new mathematical collaborations
- Random variables in integrals, how to analyze?
- Could anyone give an **example** that a problem that can be solved by creating a new group?
- How do you prevent being lead astray when you're working on a problem that takes months/years?
- Is it impossible to grasp Multivariable Calculus with poor prerequisite from Single variable calculus?
- A definite integral of a rational function: How can this be transformed from trivial to obvious by a change in viewpoint?
Related Questions in GRAPHING-FUNCTIONS
- Lower bound of bounded functions.
- Do Irrational Conjugates always come in pairs?
- Graph rotation: explanation of equation
- Plot function y = tan(yx)
- Sketching a lemniscate curve with a max function?
- 3 points on a graph
- show $f(x)=f^{-1}(x)=x-\ln(e^x-1)$
- What is this method of sketching a third degree curve?
- Getting a sense of $f(x) = x (\log x)^6$
- Can I describe an arbitrary graph?
Related Questions in MATH-SOFTWARE
- What do you think of this visual category theory tool? See any issues? Would you use it?
- Which software can check whether two algebras are isomorphic?
- Entry systems for math that are simpler than LaTeX
- Guess formula for sequence in FriCAS
- Projectile motion prolem
- Combine 3 items to total specific amounts
- Software to Draw Figures in Algebraic Topology
- Statistics Inverse Method in Rstudio
- Recommendation for math software?
- Are there Graph Theory Programs for generating graphs based on a set of constraints?
Related Questions in PYTHON
- Solve an equation with binary rotation and xor
- Function to rotate on a 3D sphere at a fixed distance?
- Verify the Riemann Hypothesis for first 1000 zeros.
- confused by the description of numpy.linalg.lstsq
- Rotate around a specific point instead of 0,0,0
- Calculating $\pi$: using a spigot and starting from middle
- Prove by the Principle of Recursion
- Use recursion to prove the bounds of the Fibonacci numbers when $n\geq 2$
- How to perform a double (numerical) integration of $f(x,y)$ over an irregular sample of $x$ and $y$ values
- What does s(n) = s(n) mean?
Trending Questions
- Induction on the number of equations
- How to convince a math teacher of this simple and obvious fact?
- Find $E[XY|Y+Z=1 ]$
- Refuting the Anti-Cantor Cranks
- What are imaginary numbers?
- Determine the adjoint of $\tilde Q(x)$ for $\tilde Q(x)u:=(Qu)(x)$ where $Q:U→L^2(Ω,ℝ^d$ is a Hilbert-Schmidt operator and $U$ is a Hilbert space
- Why does this innovative method of subtraction from a third grader always work?
- How do we know that the number $1$ is not equal to the number $-1$?
- What are the Implications of having VΩ as a model for a theory?
- Defining a Galois Field based on primitive element versus polynomial?
- Can't find the relationship between two columns of numbers. Please Help
- Is computer science a branch of mathematics?
- Is there a bijection of $\mathbb{R}^n$ with itself such that the forward map is connected but the inverse is not?
- Identification of a quadrilateral as a trapezoid, rectangle, or square
- Generator of inertia group in function field extension
Popular # Hahtags
second-order-logic
numerical-methods
puzzle
logic
probability
number-theory
winding-number
real-analysis
integration
calculus
complex-analysis
sequences-and-series
proof-writing
set-theory
functions
homotopy-theory
elementary-number-theory
ordinary-differential-equations
circles
derivatives
game-theory
definite-integrals
elementary-set-theory
limits
multivariable-calculus
geometry
algebraic-number-theory
proof-verification
partial-derivative
algebra-precalculus
Popular Questions
- What is the integral of 1/x?
- How many squares actually ARE in this picture? Is this a trick question with no right answer?
- Is a matrix multiplied with its transpose something special?
- What is the difference between independent and mutually exclusive events?
- Visually stunning math concepts which are easy to explain
- taylor series of $\ln(1+x)$?
- How to tell if a set of vectors spans a space?
- Calculus question taking derivative to find horizontal tangent line
- How to determine if a function is one-to-one?
- Determine if vectors are linearly independent
- What does it mean to have a determinant equal to zero?
- Is this Batman equation for real?
- How to find perpendicular vector to another vector?
- How to find mean and median from histogram
- How many sides does a circle have?
I have few suggestions:
Wolfram Mathematica
Python (SymPy)
other recommended things
Mathematica
I use
Wolfram Mathematica. It is not a free software, but you can use a free version of it online.That is, you can write an online wolfram mathematica notebook and then click run (shift + enter).
Your function would be something like:
But the above code is slow because we are calculating every product from the beginning. Instead of being inefficient like above, we can write a recursive function that stores and uses previous values like so:
Entering the new code into the above link I gave you, will give you:
You can also customize the
ListPlotto look nice, and then export it as pdf or image.There is mathematica.stackexchange.com for questions regarding this software. You might not even need to ask questions there, as the documentation is already very good and full of examples.
In the above example,
F[x_] := ...is a function definition andF[x_] := F[x] = ...tells the function to remember (store) the values so it does not need to re-evaluate it every time you call it for the samexvalue. Note that if you change the definition of the function, the new values will not update over the old stored ones. You need to clear them by runningClearAll[F];once, which removes the definition of theFand everything associated with it, such as the stored valuesF[x].Python
If you want to stay inside
python, look intoSymPy(e.g. SymPy's number theory) andmatplotlib.Equivalent code to the above code:
Produces an equivalent image:
Where notice that the
Mathematicaautomatically restricted the y-axis to make the plot look "pretty" (in the previous image),where in
pythonI addedplt.axis([None, None, 0.059, 0.0975])to achieve the same effect here. (Though, it looks like here x-axis is a bit shorter - but anything can be customized in both codes if you want, just explore the documentation.)Alternatives
For alternatives, check similar questions already asked here, such as:
What is a good graphing software?
Draw customized (calculus) graphs like these?
A good, free, graphics package for mathematics?