Prime-Generating Formula

(April Fools’!) I came up with this interesting prime-generating formula. It uses the constant \xi and generates the primes in order!

The constant’s approximation.
\xi = 1.603502629914017832315523632362646507807932231768273436867961017532625344 \dots

The formula p_n calculates the n-th prime.
p_n = \lfloor {10^{2 \cdot n} \cdot \sqrt{\xi^3}} \rfloor - \lfloor {10^{2 \cdot (n - 1)} \cdot \sqrt{\xi^3}} \rfloor \cdot 10^2

The first few values for p_n when starting with n=0 are as follows.
p_{0 \text{ to } 7} = \{2, 3, 5, 7, 11, 13, 17, 19, \dots \}

Advertisements

One thought on “Prime-Generating Formula

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s