求解非线性方程n/ln(n)=990000(第990000个素数近似式)
Why the Actual Prime Doesn't Satisfy Your Transformed Equation
First, let's clear up the core issue: the formula n / ln(n) = k (where k is the prime's index) is an approximation, not an exact equality. This comes from the Prime Number Theorem (PNT), which tells us the prime-counting function π(x) (number of primes ≤ x) follows:
π(x) ~ x / ln(x)
The ~ symbol means "asymptotically equivalent"—as x grows very large, the ratio of π(x) to x/ln(x) approaches 1, but they never perfectly match for any finite x. For the k-th prime p_k, the PNT gives the asymptotic estimate p_k ~ k ln(k), which rearranges to k ~ p_k / ln(p_k). Your original equation is just this approximation rearranged, so it's never going to hold exactly for the actual prime value.
Your algebraic manipulation (rearranging to n = e^(n/990000)) is mathematically correct, but since the starting equation is an approximation, the transformed version is also an approximation. That's why substituting the real 990000th prime gives a mismatch—this is normal, not a mistake in your steps.
Correct Methods to Find (or Approximate) the k-th Prime
1. Use Improved Asymptotic Approximations
The basic PNT estimate is rough, but we can add higher-order terms for far better accuracy. A common improved formula for the k-th prime is:
p_k ≈ k (ln k + ln ln k)
For k=990000:
ln(990000) ≈ 13.809ln(ln(990000)) ≈ ln(13.809) ≈ 2.626- Calculating gives
p_k ≈ 990000*(13.809 + 2.626) ≈ 16270650
For even closer results, use this higher-order expansion:
p_k ≈ k (ln k + ln ln k - 1 + (ln ln k - 2)/ln k)
This will get you much nearer to the actual prime value 15318907.
2. Numerical Iteration for the Approximation Equation
If you want to solve the approximate equation n / ln(n) = 990000 precisely (to get the best estimate from that formula), use the Newton-Raphson method—this is the standard way to solve transcendental equations with no closed-form solution.
Step-by-Step Newton-Raphson:
- Define the function we need to find the root of:
f(n) = n / ln(n) - 990000 - Compute its derivative:
f’(n) = (ln(n) - 1) / (ln(n))² - Start with an initial guess (use the improved approximation above, e.g.,
n₀ = 16270650) - Iterate using this formula:
After a few iterations, you'll converge to a value around ~15.9 million—still close to the actual prime, but not identical, since the original equation only approximates the prime-counting function.n_{i+1} = n_i - f(n_i)/f’(n_i)
3. Exact Calculation
To get the exact k-th prime, you'd need to use a specialized prime-counting algorithm (like Meissel-Lehmer) paired with a search for the smallest n where π(n) = 990000, or reference precomputed prime tables. This is how the exact value 15318907 was determined.
内容的提问来源于stack exchange,提问作者0xI

