You might have seen the famous approximation $\sin(x) \approx x$ for $x$ near 0. We can use derivatives to approximate non-linear functions by simpler linear functions. We can better understand this by looking at the graph a function $f$ under magnification.The blue curve is the graph of $f(x) = \sin(x)$ and the yellow line is its tangent at $x = 0$. We can see that, under magnification of the curve...
Generating Sexy Prime Pairs using Python
April 06, 2021 Roy John
Sexy Primes, What are they?They are prime numbers that differ by 6. For example, 5 & 11, 7 & 13. The name comes from the Latin word for six; sex. What we are going to do is, write a program to generate all the sexy prime pairs within a given interval of natural numbers. Sexy Prime PairsThis is a program to generate all the sexy prime pairs below 10000.Programdef check_prime(n): ...
Monte Carlo Integration using Python
August 18, 2020 Roy John

Monte Carlo IntegrationMonte Carlo integration is a powerful method of computing the value of complex integrals using probabilistic techniques. This technique uses random numbers to compute the definite integral of a function. Here we are going to use the python...
Generating Pseudorandom Numbers Using Congruence Theory In Python
August 18, 2020 Roy John

Pseudorandom NumbersA sequence of random numbers, chosen from the interval between 1 and some fixed integer $M$, is a sequence of numbers $x_0, x_1, \ldots $ such that for each $i$, the values of $x_i$ has a $1/M$ chance of being any given number between 1 and $M$,...
Making an Encryption Application in Python Using the RSA Algorithm
August 16, 2020 Roy John

The RSA CryptosystemRSA algorithm is an asymmetric cryptography algorithm. Asymmetric actually means that it works on two different keys i.e. Public Key and Private Key. As the name describes that the public key is given to everyone and the private key is kept private.The...
Modular Designs With Python (Congruence Theory)
August 15, 2020 Roy John

Modular DesignsCongruence theory can be used to generate beautiful designs. It is really a fun way to study congruences. Two such designs are created using python. $m$-pointed stars and $(m,n)$ residue designs.$m$ - Pointed StarsTo construct an $m$-pointed star, mark $m$...
Visualization of Collatz Conjecture using Python
August 10, 2020 Roy John

The Collatz ConjectureThe ProblemThe Collatz conjecture (a.k.a the hailstone problem or the $3n + 1$ problem) was proposed by Lother Collatz in 1937. Although the problem on which the conjecture is based is really simple that even a fourth-grader can easily understand...
Subscribe to:
Posts (Atom)
Ultimate Theorem. Powered by Blogger.
Follow Us
About Me

- Roy John
- Mathematics has always fascinated me. I love the subject since childhood. This love towards the field helped me in completing a Masters Degree in Mathematics. As much as I love the subject, I love teaching it too.
Local Linear Approximation
You might have seen the famous approximation $\sin(x) \approx x$ for $x$ near 0. We can use derivatives to approximate non-linear functions ...