
FRACTRAN
Sign in to saveFRACTRAN 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.
Wikidata facts
Show 1 more fact
- Commons category
- Fractran (programming language)
via Wikidata · CC0
~12 min read
Article
11 sectionsContents
- Understanding a FRACTRAN program
- Creating simple programs
- Addition
- Multiplication
- Subtraction and division
- Conway's prime algorithm
- Other examples
- Notes
- See also
- References
- External links
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.
gives the following FRACTRAN program, called PRIMEGAME, which finds successive prime numbers: