Skip to content

Instantly share code, notes, and snippets.

View webNeat's full-sized avatar

Amine Ben hammou webNeat

View GitHub Profile

Irrationality of Square Roots of Prime Numbers

We all remember from our fundamental mathematics classes the emphasis on the irrationality of $\sqrt{2}$ using a simple proof by contradiction.

Well, it turns out that we can extend this theorem more broadly to the square roots of prime numbers with the same kind of demonstration, and that's what we're going to demonstrate here in this article. But first, let's have some reminders about what prime numbers are.

Let $p$ be a natural number, we say that $p$ is prime if and only if $p$ is different from 1 and it has only 1 and itself as divisors. Let's denote this set of prime numbers as $\mathbb{P}$.

$$\forall p \in \mathbb{N}, \ p \in \mathbb{P} \iff \begin{cases} p \neq 1 \newline \nexists(a, b) \in \mathbb{N}^2/ \ a \neq 1 \And b \neq p \ \Longrightarrow \ p = ab \end{cases}$$

@steven2358
steven2358 / ffmpeg.md
Last active May 15, 2025 12:51
FFmpeg cheat sheet
@beanmoss
beanmoss / RestControllerTrait.php
Created April 18, 2015 12:12
Playing with Laravel Lumen: simple RESTful trait.
<?php namespace App\Http\Controllers;
use Illuminate\Http\Request;
trait RestControllerTrait
{
public function index()
{
$m = self::MODEL;
return $this->listResponse($m::all());
@isaacs
isaacs / node-and-npm-in-30-seconds.sh
Last active April 14, 2025 11:07
Use one of these techniques to install node and npm without having to sudo. Discussed in more detail at http://joyeur.com/2010/12/10/installing-node-and-npm/ Note: npm >=0.3 is *safer* when using sudo.
echo 'export PATH=$HOME/local/bin:$PATH' >> ~/.bashrc
. ~/.bashrc
mkdir ~/local
mkdir ~/node-latest-install
cd ~/node-latest-install
curl http://nodejs.org/dist/node-latest.tar.gz | tar xz --strip-components=1
./configure --prefix=~/local
make install # ok, fine, this step probably takes more than 30 seconds...
curl https://www.npmjs.org/install.sh | sh