### Representing integers as the sum of two squares

In this post we present a recursive algorithm for finding all the possible representations, as a sum of two squares, for any given integer that can be expressed this way.

Showing posts from 2017

By
Daniel Șuteu

In this unusual post, much like in the older post, The beauty of Infinity, we're listing the most famous mathematical constants as representations of infinite series, infinite products and limits.

Reactions:

By
Daniel Șuteu

Some posts ago, we looked at what it's required in creating a new programming language. In this post we're going a little bit more into it, trying to find ways to effectively express meanings in natural ways, similar to what we can express in a natural language.

Reactions:

By
Daniel Șuteu

Named after the great symbolist poet, George Bacovia, I created this library to symbolically manipulate mathematical expressions in a simple and elegant way.

Reactions:

By
Daniel Șuteu

RSA is a practical public-key cryptographic algorithm, which is widely used on modern computers to communicate securely over large distances.

The acronym of the algorithm stands for Ron Rivest, Adi Shamir and Leonard Adleman, which first published the algorithm in 1978.

# Algorithm overviewChoose `p` and `q` as distinct prime numbersCompute `n` as `n = p*q`Compute `\phi(n)` as `\phi(n) = (p-1) * (q-1)`Choose `e` such that `1 < e < \phi(n)` and `e` and `\phi(n)` are coprimeCompute the value of `d` as `d ≡ e^(-1) mod \phi(n)`Public key is `(e, n)`Private key is `(d, n)`The encryption of `m` as `c`, is `c ≡ m^e mod n`The decryption of `c` as `m`, is `m ≡ c^d mod n`

# Generating `p` and `q` In order to generate a public and a private key, the algorithm requires two distinct prime numbers `p` and `q`, which are randomly chosen and should have, roughly, the same number of bits. By today standards, it is recommended that each prime number to have at least 2048 bits.

In Perl, there is a…

The acronym of the algorithm stands for Ron Rivest, Adi Shamir and Leonard Adleman, which first published the algorithm in 1978.

# Algorithm overviewChoose `p` and `q` as distinct prime numbersCompute `n` as `n = p*q`Compute `\phi(n)` as `\phi(n) = (p-1) * (q-1)`Choose `e` such that `1 < e < \phi(n)` and `e` and `\phi(n)` are coprimeCompute the value of `d` as `d ≡ e^(-1) mod \phi(n)`Public key is `(e, n)`Private key is `(d, n)`The encryption of `m` as `c`, is `c ≡ m^e mod n`The decryption of `c` as `m`, is `m ≡ c^d mod n`

# Generating `p` and `q` In order to generate a public and a private key, the algorithm requires two distinct prime numbers `p` and `q`, which are randomly chosen and should have, roughly, the same number of bits. By today standards, it is recommended that each prime number to have at least 2048 bits.

In Perl, there is a…

By
Daniel Șuteu

In this post we're going to take a look at what infinitesimals are and why they are important.

Infinitesimals are an abstract concept of very small values that are impossible to represent quantitatively in a finite system.

# Definition We define one infinitesimal as:

`ε = lim_{n to \infty}\frac{1}{n}`

with the inequality: `ε > 0`.

In general, the following inequalities hold true:

`\frac{0}{n} < \frac{1}{n} < \frac{2}{n} < ... < \frac{n}{n}`

as `n -> \infty`.

# Appearance The infinitesimals appear in some fundamental limits, one of which is the limit for the natural exponentiation function:

`lim_{n to \infty}(1 + \frac{\x}{n})^n = \exp(\x)`

Using our infinitesimal notation, we can rewrite the limit as:

`lim_{n to \infty}(1 + ε*\x)^n = \exp(\x)`

where, for `x=1`, we have:

`lim_{n to \infty}(1 + ε)^n = \e`.

# Debate There was (and, probably, still is) a debate in mathematics whether the following limit:

`lim_{n to \infty}\frac{1}{n}`

is `0` or greater than `0`.

Con…

Infinitesimals are an abstract concept of very small values that are impossible to represent quantitatively in a finite system.

# Definition We define one infinitesimal as:

`ε = lim_{n to \infty}\frac{1}{n}`

with the inequality: `ε > 0`.

In general, the following inequalities hold true:

`\frac{0}{n} < \frac{1}{n} < \frac{2}{n} < ... < \frac{n}{n}`

as `n -> \infty`.

# Appearance The infinitesimals appear in some fundamental limits, one of which is the limit for the natural exponentiation function:

`lim_{n to \infty}(1 + \frac{\x}{n})^n = \exp(\x)`

Using our infinitesimal notation, we can rewrite the limit as:

`lim_{n to \infty}(1 + ε*\x)^n = \exp(\x)`

where, for `x=1`, we have:

`lim_{n to \infty}(1 + ε)^n = \e`.

# Debate There was (and, probably, still is) a debate in mathematics whether the following limit:

`lim_{n to \infty}\frac{1}{n}`

is `0` or greater than `0`.

Con…

Reactions: