I've got a new favourite constant to tell
you about. - (Brady: Another one?)
Ah a constant, you love a number. So um
let me write it out, here's my new
favourite constant:
2.920050977316...
going on forever. That's my new
favourite constant because, kind of magically,
this is going to create prime numbers
for us. We're gonna use this constant
and this formula, we're going to create a sequence
of numbers and the next number in your
sequence
will be taking the previous number
in your sequence; we're going to round it
down, and that's what that symbol
means, it's called the floor function you
round it down to the nearest integer,
and then we'll multiply that by taking
the previous
number in the sequence; subtracting the
integer part - so I guess it's the decimal part -
we'll add one to that and this is going
to give us a
sequence of prime numbers. Especially
when we're going to round them down as
well, we're going to use that floor function.
I'm going to prove it - we'll start with
the constant,
so that's going to be the first number
in our sequence. Let's start with f1:
first number in my sequence is this
thing, 2.9200
and the rest - and by the way I will point out
that if I round this down it's the first
prime,
it's 2. Great. Let's try the next number
in my sequence;
I've got my formula here just saying
take the previous
number, round it down so it means 2,
take the decimal part and add one,
so it's going to be multiplying by this,
1.9200
and the rest. That is going to give me
the next number it's 3.8401019
and stuff. But that's the next prime
number we were after,
it's 3, okay. So we're hoping this is
going to work as well,
3 and then yeah 1 plus the decimal part,
1.840 and stuff.
What's it gonna be?
It's going to be 5, that's good news,
and some junk
at the end of it. - (Brady: Pretty important junk)
It's going to be important junk,
that's why I'm writing it out - we need
this junk.
Uh so well, let's see if it keeps going,
we're hoping for a 7.
So we can take the integer part which
was 5,
we take the decimal part with a 1
point and then the rest:
52030586
is equal to - what's it gonna be?
7.601529
and decimal junk. One more or are you hap- are you
satisfied? Do you believe me? - (Brady: Oh let's do another one!)
Okay so what do we want the next one to be? So
we've got 3, 5,
7, 11 - it should be eleven, okay.
So we take our previous one, which is a
7, 1 plus junk.
And if you do your calculation - yes!
11.210705 and stuff!
(Brady: And this constant never fails?) - And this
is never failing. So there is this
constant somewhere out there, in the
world of numbers,
with this formula which will give you
every prime number - in order as well. Not
missing one, every prime number 2, 3,
5, 7, 11, 13 and forever. And
this constant - great - was
found by a viewer, Numberphile viewer,
who was inspired by one of my previous
Numberphile videos!
I have talked about constants that
generate prime numbers before,
and I did a video about something called
Mills' constant.
So Mills' constant was a constant and a formula,
in the same kind of way, which was this:
I'm going to call it
A and it was 1.306377883863
and stuff. So this was Mills'
constant and
the formula was, kind of like this one is
rounding down;
it was Mills' constant to the power
three to the power n, and then you would
round that down. It gave you a sequences
of primes. Umm
I'll show you what they are. So the first
prime you got
for doing this was a 2, then the next one
was 11, then the next one was
1361. And the next one was - oh it was a big
number - it was
2 billion 521 million
8 thousand 8 hundred and 87.
And then the next one is huge, like
really really big.
And and so it's generating a sequence of
primes,
although there are gaps. There are gaps
in this sequence,
and they get really big as well. So, um,
one of our viewers saw that video so
that's
Juli Garbulsky. And he was at high school
at the time and he wasn't impressed because,
oh yeah well it generates primes but big
gaps,
huge primes. He wondered could he make
a constant so he could get all the
primes?
In order as well. So he came up with this
idea.
And he started calculating this constant
with some of his friends,
so it's Bruno, Dylan and
Massi. And they created this, I've never
seen this before - I love it.
However, I can tell you now it's not
predictive.
This is not going to be able to tell me
primes I don't already know.
I'm afraid Mills' constant is the same;
we are actually using the primes
to create this constant. It exists
somewhere out there,
I'm afraid I just don't know what it is.
I'm sure creating prime constants
doesn't have to be that hard, you can
just have zero point
two, three, five, seven, one, one, one, three -
that's a prime generating constant; it's
not very interesting one though is it? It's
not very fun.
And it's not very surprising. And I think
this is kind of fun and surprising and
it does use properties of primes, they've
baked in the primes here
using particular properties of primes. I
want to show you what they've done here.
(Brady: So it's more a case that the primes are)
(generating the constant, rather than the)
(constant generating the primes?)
'Fraid you've caught me out,
yes. It's the prime's generating the
constant-
I mean it exists somewhere out there,
it'd be lovely if we could calculate it
and then we could use it to predict primes;
I'm afraid that's not the way it works.
(Brady: So the number of decimal places we know)
(this constant to)
(depends on the number of primes we know?)
Exactly, yeah I'm afraid we are limited by
how many primes we know. Umm but I do
like it, I do think it's kind of fun and
surprising. So it's a cute little
constant. - (Brady: Have they given it a name?)
I don't think they've given it a name, I
think- I know-
I knew you were going to give it a name,
Brady loves giving things names. - (Brady: I do, I do.)
(But I didn't- they have the right to name it!)
- They do. - (Yeah, but you know if they don't)
(hurry up I might jump on the bandwagon!)
Brady's going to do it first. So we'll
see, the title of this video,
what is- what has Brady decided? So let's
see how they made it.
So when I saw this I actually really
enjoyed reverse
engineering how they did it. But uh- you
might try that yourself,
but I might give you the ingredients
that you need, and then you can see
perhaps for yourself how they did it.
First of all I'm going to tell you what
a general term in the sequence looks
like. We were calling those
fn. I'm going to show you how to write fn
in terms of prime numbers;
it actually looks like this. It's the nth
prime,
and then we're going to subtract 1, and then
the next term we're going to add on
is the next prime number, so it's the n
plus 1
prime, subtract 1,
and divide that by the nth
prime. And then for the next term you
take the next prime number,
which is prime number with the n plus
2 subscript there, we subtract 1 again
and we're going to divide by the
previous primes,
pn plus 1, pn. - (Brady: Multiplied by each other, yeah?)
Yeah so we're dividing by this
multiplied by that, yes
exactly. And so you can see what the next
term might be, so the next one is going to be
the next prime number, still with
subtract 1,
and then dividing by the previous primes
we've got so
these prime numbers. And that's the
pattern that goes on forever.
So if you wanted to work out the first
one, which is our special constant,
f1 we'll start with the first prime.
So that would be 2 minus 1
plus, and then you take the next prime
3 minus 1 now,
divided by 2 and then it's going to be
the next prime
up, 5 minus 1 divided by
our previous
primes. And then next prime up
divided by our previous primes.
And that's going to be our constant that
I told you at the beginning, 2.9
whatever. So those are our starting
ingredients and then
this really important observation. We're
going to use a property of primes called
Bertrand's Postulate; it's a big thing
actually when you're studying primes.
If you've got the nth prime the next
prime
is obviously bigger, but it is
smaller than twice
the nth prime. I'm not going to do the
proof for you,
it's totally possible to do for yourself.
When I heard about this constant I thought it
was great, I loved it, I thought it was
good fun. I went looking to see if anyone had
done it before, and I've not seen anyone
do it before;
but I did find it in one place.
In a kind of completely different
context, I found it somewhere
which is with this sequence, something
slightly different.
We're going to look for the smallest
prime
that doesn't divide n, that doesn't
divide n. - (Brady: So it's not a factor of n?)
So it's not a factor
of n. So for 1, the smallest prime that doesn't
divide 1 is 2. Smallest prime that
doesn't divide
2 is 3, the smallest prime that
doesn't divide
3 is 2, smallest prime that doesn't
divide 4 is 3, smallest prime that
doesn't divide
5 - 2, smaller pilot doesn't divide
6 can't be 2,
can't be 3 - that one's a 5. And
then it's a 2 here,
and a 3 here and so on. So that's a
sequence,
smallest primes that don't divide n. And,
if you look at the average of this
sequence-
and this is going on forever, but if you
took the average of this sequence
it is my new favourite constant.
(Brady: It's the prime generator?) - It's the prime
generator! Completely different sequence,
this is going on forever so we're
looking at what the average
tends to. To work out the average
you look at the proportion
of these numbers that are
2, and so- and half of them are. Half of
this- half of these numbers
are a 2. Then you would look at the
proportion of these numbers that are a
3;
and if you look there you can work out
the proportion of 3s.
Look at the proportions of 5s; and
using those numbers you can add them up,
you can find the average of the sequence.
Do you want to learn more about prime
numbers and
divisibility? Or how about any of these
subjects?
Look, no matter what you're into
Brilliant is going to have the quizzes,
problems, entire courses for you that are fun,
interactive and lovingly designed to
engage your brain,
to make you smarter! These aren't like homework
or some kind of chore; they're fun,
they're stimulating,
they're created by people who really
know their stuff.
By the way Brilliant, loving the new
design - such a great looking site.
Go to brilliant.org/numberphile to see
more and get 20% off a premium
subscription,
that accesses everything on the site.
That's brilliant.org/numberphile.
Sign up for yourself or
maybe
give Brilliant as a gift!