# Predicting Prime Density in Factorial/Primorial Sequences

• CRGreathouse
In summary, the conversation focuses on a heuristic model for predicting the probability of primes in factorial/primorial sequences. The original Cramér model is extended to incorporate the probability of numbers being relatively prime to the first n primes. The extended model does not have a specific name and is represented by a system of models for each positive n. The product used in the model has values that can be approximated by Merten's theorem. The asymptotic density of primes in factorial/primorial sequences is estimated to be e^\gamma/n, suggesting an infinite number of primes in these sequences. However, a correction is made to the formula for the specific case of (n!)^2+1, which would have half the estimated density. The
CRGreathouse
Homework Helper
I was trying to do some heuristics with the Cramér model, but I wasn't able to find a good asymptotic for a certain quantity and I thought I'd see if anyone had something good. I did check a few sequences on the OEIS first, but I didn't notice anything there.

Essentially, I'm looking to predict the rough density/probability of primes in factorial/primorial sequences. Consider $n!+1$, for example. In the naive Cramér model the chance it's prime is

$$\frac{1}{\log(n!)}\approx\frac{1}{n(\log(n)-1)}$$

but since it is relatively prime to 2, 3, ..., n a better 'probability' would be

$$\frac{1}{n(\log(n)-1)}\prod_{p\le n}\frac{p}{p-1}$$

My questions:
1. Is there a name for this extended model? I've seen it before, but I don't recall its name. Actually it's a system of models, one for each positive n, in which the probability of N being prime is 0 if N is divisible by some prime less than or equal to n, and prod{p/(p-1)}/log(N) over the primes less than or equal to n. The original model corresponds to n = 1.
2. Is there a simple approximation for the product I use above? Its values are 1, 2, 3, 3.75, 4.375, 4.8125, ... for 1, 2, 3, 5, 7, 11, ...
3. My immediate interest is in http://www.research.att.com/~njas/sequences/A046029 , which I've been working on calculating (checking up to 10,000). If my understanding is correct, the above huristic suggests a chance of 1/n (limiting as n becomes large) for each number to be prime, and as such in the sequence. This in turn suggests that the sequence has an infinite number of elements since the harmonic series diverges. Are there any problems with this analysis?

Last edited by a moderator:
CRGreathouse said:
1. Is there a name for this extended model? I've seen it before, but I don't recall its name. Actually it's a system of models, one for each positive n, in which the probability of N being prime is 0 if N is divisible by some prime less than or equal to n, and prod{p/(p-1)}/log(N) over the primes less than or equal to n. The original model corresponds to n = 1.

I can't say I can recall it having a name of it's own.

CRGreathouse said:
2. Is there a simple approximation for the product I use above? Its values are 1, 2, 3, 3.75, 4.375, 4.8125, ... for 1, 2, 3, 5, 7, 11, ...

Yes, Merten's theorem.

Caldwell and Gallot have a paper about the heuristic for the primorials and factorials, http://www.utm.edu/~caldwell/preprints/primorials.pdf

shmoe said:
Yes, Merten's theorem.[/url]

When my eyes ran over the formula earlier today (in my new Crandall & Pomerance), I realized that this was what I needed. I wish I realized that earlier.

This gives

$$\frac{e^\gamma}{n}$$

as an asymptotic density, which seems to fit my estimates pretty closely. That suggests an infinite number of primes of the form (n!)^2+1 by the divergence of the harmonic series -- right?

In any case there are no primes of this form from 77 to 7000, by my checking. I'm going to submit this to Sloan's list, with this heuristic (or an improvement?), along with a correction to the entry, when I get to 10,000.

CRGreathouse said:
This gives

$$\frac{e^\gamma}{n}$$

as an asymptotic density, which seems to fit my estimates pretty closely. That suggests an infinite number of primes of the form (n!)^2+1 by the divergence of the harmonic series -- right?

Should be half that density if you're looking at (n!)^2+1.

shmoe said:
Should be half that density if you're looking at (n!)^2+1.

Yeah, sorry. I had it right on my scratch paper.

## 1. What is the purpose of predicting prime density in factorial/primorial sequences?

The purpose of predicting prime density in factorial/primorial sequences is to understand the distribution of prime numbers within these sequences. This can provide insight into the behavior of prime numbers and potentially lead to new discoveries in number theory.

## 2. What methods are used to predict prime density in factorial/primorial sequences?

Various mathematical and statistical techniques are used to predict prime density in factorial/primorial sequences. These include the PNT (Prime Number Theorem), sieve methods, and probabilistic models.

## 3. How accurate are these predictions?

The accuracy of predictions for prime density in factorial/primorial sequences varies depending on the specific method used and the size of the sequence being analyzed. In some cases, predictions can be very accurate, while in others they may be less precise.

## 4. What factors affect prime density in factorial/primorial sequences?

The prime density in factorial/primorial sequences can be affected by a variety of factors, including the size of the sequence, the specific numbers included in the sequence, and the underlying distribution of primes within the sequence.

## 5. How can predicting prime density in factorial/primorial sequences benefit other fields of science?

The study of prime numbers and their distribution within factorial/primorial sequences has implications in a variety of fields, including cryptography, computer science, and physics. By understanding the patterns and behaviors of prime numbers, scientists can potentially make advancements in these and other areas of research.

Replies
2
Views
3K
Replies
2
Views
2K
Replies
17
Views
5K
Replies
13
Views
2K
Replies
4
Views
3K
Replies
8
Views
4K
Replies
1
Views
914
Replies
1
Views
3K
Replies
9
Views
4K
Replies
1
Views
284