And it's more than a primes generator, it also gives the prime
factors of N if N is composite.
(they appear in the row of tunnels when N is tested).
The principle is quite simple I used the Eratosthenes' sieve, wich
consists in withdrawing every multiple
of any prime number encountered.
Actually, it's not very pure. It gives the first 61 prime numbers up
to 283 correctly with no mistake but the first 6 primes (2, 3, 5, 7,
11, 13) are "built in".
It couldn't go beyond 288 because it would consider 289 as prime,
which is not true (289=17^2).
The level can be improved by finding a way to remove those built-in
primes.
Sad that tunnels can't be moved ;-).
I am convinced that other applications can be found related to the
number theory.
After all, we can detect multiples using counters, we can add,
divide, substract, compare.
And I actually have fun imagining other applications in the metro.
The size of the grid is the biggest problem : 16x16 is very
restricting if you want to combine several elements that are already
big.
Alexis Monnerot
--- In [email protected], "Steve" <stephen.ryan@3...> wrote:
> Alexis Monnerot has made "Prime numbers generator" in Special-
I.lvl. I
> need to find time to look at the level further, but I think this is
> the finest and most amazing application of mathematics to LT so
far -
> an actual "useful" application! (not just a demo or exhibition).
>
> I am wondering what other tasks can be programmed into a level. we
> have a fairly good "toolbox" with which to work, now. Is there
enough
> complexity to calculate pi? any suggestions? any other interesting
> theorems, series, or proofs, etc?
> -steve