3 ms·
Doesn't this just encode a list of all the primes in a real number, then define a function which extracts each subsequent value? This seems exactly equivalent t
by naniwaduni 7y ago
Doesn't this just encode a list of all the primes in a real number, then define a function which extracts each subsequent value? This seems exactly equivalent to defining an array of primes and a function which indexes that array, and passing that off as a function representing all primes. That we can multiplex datagrams into a stream isn't particularly novel.
- duskwuff 7y agoI'm reminded of the formula whose graph is an image of the formula: https://en.wikipedia.org/wiki/Tupper%27s_self-referential_formula https://en.wikipedia.org/wiki/Tupper%27s_self-referential_fo...
- naniwaduni 7y agoIt's not even as interesting as that.
- notfashion 7y agoRepresenting an arbitrary sequence of bits, digits, etc. using a real number is the basis for arithmetic coding. As such, it's an approach that has been productive historically, and arithmetic coding continues to be widely used. So the basic idea of encoding whatever you want to encode in a single real number (obviously represented to just enough precision) isn't fruitless and boring. In this case it is a number that is easy to calculate using the formula given, which doesn't at first glance resemble a prime sieve.
- rlpb 7y ago> In this case it is a number that is easy to calculate using the formula given It appears to me that the formula given requires pre-existing knowledge of the list of primes in order the expand the series.
- naniwaduni 7y agoIt is exactly like arithmetic coding. The formula given allows you to improve the precision of the constant given by encoding more primes, and it equally well lets you encode integers that are not prime. It doesn't resemble a prime sieve because it's not one; you just construct approximations with existing knowledge of what the primes are.