• šŸŒ™ Community Spirit

    Ramadan Mubarak! To honor this month, Crax has paused NSFW categories. Wishing you peace and growth!

primegaming

FRACTRAN is a Turing-complete esoteric programming language invented by the mathematician John Conway. A FRACTRAN program is an ordered list of positive fractions together with an initial positive integer input n. The program is run by updating the integer n as follows:

for the first fraction f in the list for which nf is an integer, replace n by nf
repeat this rule until no fraction in the list produces an integer when multiplied by n, then halt.Conway 1987 gives the following FRACTRAN program, called PRIMEGAME, which finds successive prime numbers:

Starting with n=2, this FRACTRAN program generates the following sequence of integers:

2, 15, 825, 725, 1925, 2275, 425, 390, 330, 290, 770, ... (sequence A007542 in the OEIS)After 2, this sequence contains the following powers of 2:
(sequence A034785 in the OEIS)
The exponent part of these powers of two are primes, 2, 3, 5, etc.

View More On Wikipedia.org
Top Bottom