Can You Engineer a Formula for Primes?

Herbert Wilf, What is an answer?

Jeffrey Shallit, No formula for the prime numbers?

That it eats a lot of ram?

Then why ask such a question if you already think you know the answer?

So why is the user written as root for both encoder and avideo in this tutorial?

Could it be because the database was not created for it?

**Dio_GEN_2**

*2022-09-28 22:27:22*

**K11M1**

*2022-09-28 22:18:02*

Watch this and maybe you’ll get why https://youtu.be/j5s0h42GfvM

**– YouTube**

*Can You Engineer a Formula for Primes?*: Willans’ FormulaIs there a formula for the nth prime number? One was cleverly engineered in 1964 by C. P. Willans. But it raises the question of what should actually count as a formula.

—————-

References:

*Herbert Wilf, What is an answer?*, The American Mathematical Monthly 89 (1982) 289-292.

https://doi.org/10.1080/00029890.1982.11995435

C. P. Willans, On formulae for the nth prime number, The Mathematical Gazette 48 (1964) 413-415.

https://doi.org/10.2307/3611701

Further reading:

*Jeffrey Shallit, No formula for the prime numbers?*.

http://recursed.blogspot.com/2013/01/no-formula-for-prime-numbers.html

—————-

# Python code

import math

def prime(n):

return 1 + sum([

math.floor(pow(n/sum([

math.floor(pow(math.cos(math.pi * (math.factorial(j – 1) + 1)/j), 2))

for j in range(1, i+1)

]), 1/n))

for i in range(1, pow(2, n)+1)

])

—————-

(* Mathematica code *)

prime[n_] := 1 + Sum[Floor[(n/Sum[Floor[Cos[Pi ((j – 1)! + 1)/j]^2], {j, 1, i}])^(1/n)], {i, 1, 2^n}]

—————-

0:00 A formula for primes?

1:24 Engineering a prime detector

4:00 Improving the prime detector

5:46 Counting primes

6:29 Determining the nth prime

9:42 The final step

11:36 What counts as a formula?

12:56 What’s the point?

13:51 Who was Willans?

—————-

Animated with Manim. https://www.manim.community

Thanks to Ken Emmer for supplying the microphone.

Web site: https://ericrowland.github.io

Twitter: https://twitter.com/ericrowland

**K11M1**

*2022-09-28 22:28:27*

**Dio_GEN_2**

*2022-09-28 22:27:22*

Well I understood this concept, that wasn’t my question

**K11M1**

*2022-09-28 22:28:45*

**K11M1**

*2022-09-28 22:29:20*

*That it eats a lot of ram?*

**Naim Miah**

*2022-09-28 22:29:51*

**K11M1**

*2022-09-28 22:29:20*

sudo apt install zram-config

**K11M1**

*2022-09-28 22:31:45*

**Naim Miah**

*2022-09-28 22:29:51*

why the sudo?

**Dio_GEN_2**

*2022-09-28 22:31:57*

**K11M1**

*2022-09-28 22:28:45*

It’s just getting information from things that should not contain such

Like that formula, it’s dead simple but still works flawlessly for any prime

**K11M1**

*2022-09-28 22:32:34*

**Dio_GEN_2**

*2022-09-28 22:31:57*

Like that formula, it’s dead simple but still works flawlessly for any prime

Well as long as you have ton of memory and computational power to have that factorial

**K11M1**

*2022-09-28 22:32:54*

**K11M1**

*2022-09-28 22:33:04*

**Dio_GEN_2**

*2022-09-28 22:33:53*

**K11M1**

*2022-09-28 22:32:54*

Well, of course it isn’t

It was likely improved or new ways were found

**K11M1**

*2022-09-28 22:34:08*

**Dio_GEN_2**

*2022-09-28 22:33:53*

It was likely improved or new ways were found

Oh ok

**cancrl18**

*2022-09-28 22:34:10*

**K11M1**

*2022-09-28 22:31:45*

Sudo is the recommended command to give you ‘full’ access to the system during the particular install, there’s other commands that do similar on various ‘nix based OS.

**K11M1**

*2022-09-28 22:34:24*

**K11M1**

*2022-09-28 22:34:29*

**cancrl18**

*2022-09-28 22:34:10*

No no no no no

**K11M1**

*2022-09-28 22:34:39*

**cancrl18**

*2022-09-28 22:35:05*

**K11M1**

*2022-09-28 22:35:15*

**K11M1**

*2022-09-28 22:35:46*

**K11M1**

*2022-09-28 22:36:14*

**cancrl18**

*2022-09-28 22:37:11*

*Then why ask such a question if you already think you know the answer?*Maybe they have a habit of it even if it’s not always necessary or smart.

**K11M1**

*2022-09-28 22:38:04*

**cancrl18**

*2022-09-28 22:37:11*

Well you are the one who started trolling with zram and “sudo apt”…

**Elvis Presley**

*2022-09-28 23:03:18*

**sara sara**

*2022-09-28 22:22:33*

*So why is the user written as root for both encoder and avideo in this tutorial?*

Bad practice. Inexperienced user

**luna0svet**

*2022-09-28 23:07:55*

**cryptodanvr**

*2022-09-28 20:52:23*

Run fsck -y

It workd finallllllly

**sara sara**

*2022-09-28 23:10:18*

**Elvis Presley**

*2022-09-28 23:03:18*

Bad practice. Inexperienced user

**sara sara**

*2022-09-28 23:10:18*

**Elvis Presley**

*2022-09-28 23:03:18*

Bad practice. Inexperienced user

**sara sara**

*2022-09-28 23:10:18*

**Elvis Presley**

*2022-09-28 23:03:18*

Bad practice. Inexperienced user

ok. I typed these commands for Encoder. Why doesn’t Encoder come up when I put it in the browser? If localhost/YouPHPTube-Encoder is typed in the browser, shouldn’t the encoder on the installation page come up? But why does this page appear? This is written in the browser:

localhost/YouPHPTube-Encoder/install/index.php

*Could it be because the database was not created for it?* I haven’t created the database yet for the encoder

**sara sara**

*2022-09-28 23:10:30*

**Elvis Presley**

*2022-09-28 23:03:18*

Bad practice. Inexperienced user

I mean this installation page

**ariefr**

*2022-09-29 02:05:10*

**watzon**

*2022-09-29 02:23:19*

**cryptodanvr**

*2022-09-29 02:45:02*

**ariefr**

*2022-09-29 02:53:44*

**watzon**

*2022-09-29 02:23:19*

Used to be the rules channel before the great channel purge of 1959

so the rules are purged

**watzon**

*2022-09-29 02:57:02*

**ariefr**

*2022-09-29 02:58:00*

**Elvis Presley**

*2022-09-29 02:59:38*

**watzon**

*2022-09-29 02:57:02*

For now the main rule is use common sense

But that doesn’t really exist for 99.9% of the population right now