Numeral systems

today I will write a post about numeral systems and how they generally work. I already wrote about binary and decimal system, but in the last week I did some research on generally numeral systems.

So, just to recap. We normally use decimal system, this means that we use ten symbols to represent numbers, from 0 to 9. First place of number is the number itself, second position represents the number times 10 because we are in decimal system and 3rd represents number times 100 and so on. The general formula to transfer numbers to decimal system goes like this:

anbn + an − 1bn − 1 + an − 2bn − 2 + … + a0b0

a stands for the number that we see written, b stands for the system it is written in, n is the digit where a is –> 0 is the first place.

For example 1334 in the numeral system “7” would be:

4*1+3*7+3*49+1*343=515 in decimal system.

Note how you can represent easily any number in any system because of how the exponents rise in every single digit by one. If the numbers before the next digit are all full, like x9999 in decimal system or x4444 in base 5 system you always need to add only one to reach the next digit, this way there are no numbers left out.

What I really like is that if you had a machine that could change from any numeral system to other you could multiply numbers extremely easily. In decimal system if you multiply by 10 it is very easy because you just add one zero, why? Because all the numbers are “multiplied” by 10 with some exponent already and you just add one which moves all of the numbers to left. In binary system if you multiply by two you just move all the numbers by one digit:

101010111*10=1010101110      (10 is 2 in decimal) Or in 6 base system:
420351234*10=4203512340   (10 is 6 in decimal)

You are basically multiplying by “10” though you need to remember that the number is still in that system.

What about rational numbers? The stuff behind point?

I was really wondering about this and Wikipedia helped out! The exponents are simply negative as in the example below (binary number 10.11 to decimal system):

1×21 + 0×20 + 1×2−1 + 1×2−2 = 2.75

First place –> exponent 0
Second place –> exponent 1
First place behind point –> exponent -1Second place behind point –> exponent -2

Thats it for today.


Binary system explained (part 2)

in the last post I wrote about converting from binary to decimal number. Today I will continue, if you want to read the basics about binary just check out the post. This is also linked to my post about counting to 1,023 on your fingers.

So lets say that we have number 137 and we want to convert it into binary.

You have seen in the previous post that there is some highest digit that has the value of 1 instead of 0 which means that it stores the information[1]. We need to find out this value.

Its easy, its the highest 2ª number smaller or equal to our original value (137).

Such a number is 128 which is 2^7 so it is going to be the 8th number since we use 2º too (and 2º is on the 1st place).
Now we subtract it having 137-128=9 (1xxxxxxx)

Now we repeat with 9. The number that is smaller or equal is 2³=8
9-8=1 and the next 1 that stores information is on the fourth position. (10001xxx)

1 is easy because 2º also equals to 1 and it is on the first place. So 137 looks like this in binary: 10001001.

Lets try 759:

759-512=247 (10th number is the first 1) =1xxxxxxxxx
247-128=119 (8th number is 1, stores the information) =101xxxxxxx119-64=55 (7th number is 1) =1011xxxxxx
55-32=23 (6th number is 1) =10111xxxxx
23-16=7 (5th number is 1) =101111xxxx
7-4=3 (3rd number is 1) =10111101xx
3-2 … 1-1 === 1011110111 (quite lucky with so many ones ;))

Hope this all makes sense, if it does not just write in the comments below.

Btw. thought you have infinitely many systems that you can use, binary is the simplest of them all. You can not store information in less symbols because with one symbol you would not be able to distinquish where one information ends and another begins. You need to use “space” or some number or something.


How to! 5) Multiply two digit numbers in your head

today I was sitting outside, chilling out and just as that I started to multiply numbers always adding one: 1*1=1 2*2=4 3*3=9 and so on. And I wondered, how far can this go without paper or calculator?

Well I finished with 100*100 without leaving single number and after a while I started to use this kind of fast and intuitive technique which in this post will be used only to multiply two same numbers smaller than 100.

Lets say you need to multiply 47*47.   (40+7)*(40+7)

Fourty will be called “base number”. The first thing you need to do is to multiply base numbers to get your base. This is simple because 40*40 is the same as 4*4 plus two zeros which means 1600.

Base is quite easy to remember so you do not need to concentrate on that much. Now we need to combine base numbers with, lets call them “pariah numbers”.

In our case pariah number is 7. You multiply it with base number to get 40*7=280 or simply 4*7=28 (+ zero from base number). Because we have two same brackets we need to multiply this twice and add it which is the same as multiplying your result by 2.


Now just add this “double number” to your base which should be quite easy:


Repeat this one few times and then add the product of two pariah numbers to get the result:


Try this few times, and if you are sure in this simple case try any two digit numbers. It is quite nice way to warm up your brain 😉


Why 1-1+1-1+1-… could equal to 1/2!

this post is made according to Numberphile video which is pretty cool and you can check it out here.

Lets jump right to the problem of sum: 1-1+1-1+1-1+…

The problem with this sum is that it does not converge into some value like this sum:


We know this because for infinite amount of adding we get 2. The problem appears when you have sum like the one above which does not converge at all but rather oscilates between 0,1,0,1,0,1,0,1…

To get the solution we can do few things, we can give brackets there:

(1-1)+(1-1)+(1-1)+… this gives us 0 because all the brackets equal to 0.

1+(-1+1)+(-1+1)+(-1+1)+… this equals to 1 because all the brackets are 0 but there is this 1 on the start.

There is third solution:







In the video they do not say much more about it but I found that this is a method called Cesàro summation. This is just a method so yes you can say that this sum equals to 1/2 according to the method.

In math stack exchange they say this. And on wikipedia they say that Grandi’s series (1-1+1-1+1…) can not be solved like this:

“It can be shown that it is not valid to perform many seemingly innocuous operations on a series, such as reordering individual terms, unless the series is absolutely convergent.”

Though this is probably that much I can say for this sum since I do not yet understand the higher mathematics involved in all those proofs.





How big really is the new prime?

it has been few weeks/days since the last prime was found. It was a huge boom since it happens less and less often as the prime increases and we are getting to even bigger numbers. How big this number actually is? Well in this post I will try to show it, and it is really huge.

I heard some great analogies to 52! (factorial) which is pretty big number. What I decided to do is to do the same thing with the new prime, but oops, this number is way too big.

This is the number which has been found: 274,207,281

It has 22,338,618 million digits, which is way too high to tell you something.

Now imagine that you are counting, every second you add one. How long time would it take you to get to this number? Long time.

More accurately since that is very relative: 6.80348129009742 × 1022338599

This many times of Universes, roughly. What? The number did not even change! Actually there is like 19 less digits.. still not quite good.

So I started to do those analogies for the time written above.

Ok you have a normal can of coca-cola. Such a can has about 330 milliliters. One drop of water (that is actually SI unit) has 0.05 ml. This means that if you would fill it with the rate of one drop per second you would fill it in 6,600 seconds which means almost two hours.

On height, one can has 0.000122 kilometers. Now imagine that if you would fill it you would then put it on one another. You would rise this tower of cans to the height of Sun, that is 150,000,000 kilometers. With filling each of these cans it would take you about 8 trillion seconds [1], this is roughly 253,678 years.

Then you would destroy such tower and take one drop (0.05 ml) from the Atlantic ocean. Atlantic ocean has volume of 323.6 million of cube kilometers. Before you would take another drop of water from the Atlantic you would have to create this tower again.

It would take you about 1.6 sextillion of years to do this thing [2].

Now imagine that after emptying whole Atlantic ocean, you would fill it again (immediately) but you would take one atom from your body (imagine that your body does not change). Then you would fill those cans, stack them to the sun, do that so many times that you would empty Atlantic ocean and do that so many times that you would actually move all atoms from your body to some different place (there are 7*1027 atoms in your body). Too bad, this would take you only 1.2*1049 years.

When I did those analogies I did not really thought about how big the number was going to be so I was a bit dissapointed, at the same time I realised that the prime number is whole next level and I could equal it only with another monstrosity.

Imagine doing all the previous steps and then arranging 3,900,000 numbers into one row. There are 3900000! combinations and you would do all of them, but between each step you would have to do all the previous. Roughly such a thing would take you the same time as counting by one every second to get to the new prime number.

Thanks for reading!

[1]8 trillion is 8,000,000,000,000
[2]1.6 sixtillion is 1,600,000,000,000,000,000,000

If you really want to see the source of the image: here.


Turn your brain into supermassive black hole

here it comes here it goes! Today I am writing probably the last post from Brazil since I am leaving in Tuesday. Maybe tommorow after seeing Christ in Rio, I will be able to write another one.
Anyway, here comes the promised post about Ackermann function.

Ackermann function is a function with two inputs and it is growing extremely fast. To see the results it is best to make a table. Ackermann
function is written like this: A(m,n).
There are few types of Ackermann function because some people made their modifications of it to fit their plans. Here I will mention the most famous one.
 A(m, n) = \begin{cases} n+1 & \mbox{if } m = 0 \\ A(m-1, 1) & \mbox{if } m > 0 \mbox{ and } n = 0 \\ A(m-1, A(m, n-1)) & \mbox{if } m > 0 \mbox{ and } n > 0. \end{cases} So lets see what this function means:
A(m,n) is the input of this. If m=0 then you will make n+1 and find it in the table which is below.
If m is bigger than 0 and n=0 then you will call Ackermann function again with m-1 and n=1.
Last one, when you have m>0 and n>0 then you call the function again with m lowered by one and n will be defined by another A function which obeys

m\n 0 1 2 3 4 n
0 1 2 3 4 5 n + 1

the rules again. Lets see the table. This is the first row which is extremely simple. M is the vertical axis. So when the arguments are A(0,0) then you go as follows: m=0 which means that you higher n by one which is 1 and that is the result.

If A(3,2) it gets very messy: here you go.
A(2,A(3,1)  — because n and m are higher than 0 you lower m by one and then you call another function with n lowed by one.
A(2,A(2,A(3,0) — both are still higher, so you do the same thing again..
A(2,A(2,A(2,1) — change the function from A(3,0) to A(2,1) because n is 0 according to rule above
A(2,13) — I skipped lot of the steps because it is such a mess when you have to do it whole again but it equals 29.

Values of A(mn)
m\n 0 1 2 3 4 n
0 1 2 3 4 5 n + 1
1 2 3 4 5 6 n + 2 = 2 + (n + 3) - 3
2 3 5 7 9 11 2n + 3 = 2\cdot(n + 3) - 3
3 5 13 29 61 125 2^{(n + 3)} - 3
4 13




265536 − 3


{2^{2^{65536}}} - 3


{2^{2^{2^{65536}}}} - 3


\begin{matrix}\underbrace{{2^2}^{{\cdot}^{{\cdot}^{{\cdot}^2}}}} - 3\\n+3\end{matrix}
5 65533

=2\uparrow\uparrow\uparrow 3 - 3

2\uparrow\uparrow\uparrow 4 - 3 2\uparrow\uparrow\uparrow 5 - 3 2\uparrow\uparrow\uparrow 6 - 3 2\uparrow\uparrow\uparrow 7 - 3 2\uparrow\uparrow\uparrow (n+3) - 3
6 2\uparrow\uparrow\uparrow\uparrow 3 - 3 2\uparrow\uparrow\uparrow\uparrow 4 - 3 2\uparrow\uparrow\uparrow\uparrow 5 - 3 2\uparrow\uparrow\uparrow\uparrow 6 - 3 2\uparrow\uparrow\uparrow\uparrow 7 - 3 2\uparrow\uparrow\uparrow\uparrow (n+3) - 3

Here is the rest of the start of the table. It increases rapidly since it repeats over and over again (this is called recursion). You see that you have to use Knuth`s up-arrow notation.
Now you see why A(G64,G64) is such spawn of hell.
The reason for Ackermann function to exist and to be so famous is that it is one of the first functions that are used in computability theory. It is the theory which asks what means that the function is not computable and how much not computable it is. Computable functions are those for which we can find some algorithms, and algorithms are very important. For example in computations.
It seems for example that there is no computable function for finding prime numbers or at least no efficient one.


Turn your brain into black hole

here it goes, here it comes! Today I want to write about Graham’s number which is very interesting number and highest number which has some usage in mathematics.

Ok first of all, what is its purpose?
Imagine square where all vertices are connected. You can connect them by two colors, blue and red. You are trying to avoid one special pattern which you can see behing the mathematician Ron Graham who invented this number about which I will talk in a while. So those points can not be connected by single color the thing is that when you increase the dimension it is little harder (you already now everything about dimensions if you read my last post).
When you have 3rd dimension as you can see on the right there are 8 vertices.
This means that there are 28 lines between those dots.
Yes it is possible to avoid the special configuration. When you continue to fourth dimension you can still do it but here comes the problem. In fourth dimension there are 2^120 possible ways to color this cube. This is such a large number that no computer can solve it, in decent amount of time. Now you need to make some better way to solve it. Through some better way which I dont know mathematicians got up to 13th dimension, now they dont know maybe it is possible maybe not but the number when we are COMPLETELY sure that it is not possible is Graham’s number.

To show you how large is Graham’s number I first of all have to explain Knuth’s up-arrow notation.
That’s about it when you have one arrow. It gets better when you have two:
3↑↑2=3^3=27 , easy.
3↑↑3=3^3^3=3^27=over 7 trillions   \begin{matrix}    a\uparrow\uparrow b & = {\ ^{b}a}  = & \underbrace{a^{a^{{}^{.\,^{.\,^{.\,^a}}}}}} &     = & \underbrace{a\uparrow (a\uparrow(\dots\uparrow a))}  \\       & & b\mbox{ copies of }a     & & b\mbox{ copies of }a   \end{matrix}
Lets see three of them:
2↑↑↑3=2↑↑(2↑↑(2↑↑2)=2↑↑65536   \begin{matrix}    a\uparrow\uparrow\uparrow b= &     \underbrace{a_{}\uparrow\uparrow (a\uparrow\uparrow(\dots\uparrow\uparrow a))}\\     & b\mbox{ copies of }a   \end{matrix}
Easy it continues and it gets hella huge.
So when I found out that Graham’s number needs arrow notation to be written I was like: “Easy, there will be few arrows, arrow notation is such extreme tool.”
Then after I found out how big is Graham’s number I was just like: “Oops!” You will se why.
So lets define the number g1

=3↑↑↑(3↑↑(3↑27) i think that this is enough for ilustration.
now lets define g2=3↑↑↑↑↑↑↑…3 number of arrows equals to g1

Surprised? We are not even in beginning.
g3=3↑↑↑↑…3 number of arrows equals to g2 … so you know the process, this continues up to g64 which is Graham’s number.

Ok this is extremely large number and to remind you it is number of dimensions, which means that the combinations are even much higher, not kidding.
The Graham’s number has real meaning but I am not really able to understand so if you want to check it, somewhere in the video Ron Graham explains it. Also Numberphile has some other videos about it so check them out.
Next time I will write about Ackermann function. After that you will get this XKCD joke:
Thanks for reading,

PS: I found lot of people trying to liken stuff to Graham’s number. Dont even try that, you wont get very close.