2016-04-09, post № 116

mathematics, programming, Python, #factor, #factorize, #factors, #prime, #prime factorization, #unique factors

Playing around with prime numbers, I created this simple factorization program.
The interesting thing about prime factors is that they are unique. There can only be one way to multiply prime numbers to get 𝑛 where n\in\mathbb{N} and n\geq 2 (excluding the commutative property).For example, 2\cdot 3\cdot 7=42 and that is the only way to multiply prime numbers to get to 𝟦𝟤.

Source code: factorization.py

Jappy Jird

2016-04-02, post № 115

games, programming, Pygame, Python, #bird, #clone, #flappy, #flappy bird, #game clone, #pixel, #pixel game, #pixel-themed, #pixelated

This game is a clone of the famous international hit Flappy Bird.
You control the little pixel-bird, while it flaps through three different scenes and tries to avoid deadly pipes. Your score is measured by how many pipes you can pass.


  • ‘Escape’ pauses and resumes the game,
  • ‘F1’ takes a screenshot,
  • Up arrow key makes the bird flap.
Source code: jappy-jird.py

Prime-Generating Formula

2016-04-01, post № 114

mathematics, #generating, #prime formula, #primes

(April Fools’!) I came up with this interesting prime-generating formula. It uses the constant 𝜉 and generates the primes in order!

The constant’s approximation.

\xi = 1.603502629914017832315523632362646507807932231768273436867961017532625344\dots

The formula p_n calculates the 𝑛-th prime.

p_n=\lfloor{10^{2\cdot n}\cdot\sqrt{\xi^3}}\rfloor-\lfloor{10^{2\cdot(n-1)}\cdot\sqrt{\xi^3}}\rfloor\cdot 10^2

The first few values for p_n when starting with 𝑛 = 𝟢 are as follows.

p_{0\text{ to }7}=\{2,3,5,7,11,13,17,19\}
Jonathan Frech's blog; built 2021/04/16 20:21:20 CEST