[seqfan] Re: G-code

M. F. Hasler seqfan at hasler.fr
Mon Aug 3 00:14:44 CEST 2015


Eric,
the natural way is to use the smaller primes for the less significant
digits, which would be
2015 = prime(4)^2 prime(3)^0 prime(2)^1 prime(1)^5
This is indeed well known, see https://oeis.org/A054842.
In this case, e.g. a(12) = 3^1*2^2 = 12.
But it's somehow arbitrary to use the base 10 encoding to start with
(why limit ourselves to powers <= 9 ?)
There are certainly many possible variants of this idea.

Maximilian



On Sun, Aug 2, 2015 at 2:51 PM, Eric Angelini <Eric.Angelini at kntv.be> wrote:
>
> Hello SeqFans,
> Let's code an integer more or less
> like Gödel -- with prime powers.
> We'll G-code 2015 like this:
> 2^2*3^0*5^1*7^5 which reads 4*1*5*16807
> which is 336140.
> Working backwards we'll decompose
> 336140 into primes and get:
> 336140=2*2*5*7*7*7*7*7 which is
> 2^2*3^0*5^1*7^5 and unambiguously
> 2015.
> We'll have a problem with integers
> that end with one or more zeroes.
> We can solve that like this:
> 2010 --> 2^2*3^0*5^10 and _not_
> 2010 --> 2^2*3^0*5^1*7^0 of course.
>
> Are there integers that are their own G-code?
> Best,
> É.
> (sorry if this is old hat...)
>
> _______________________________________________
>
> Seqfan Mailing list - http://list.seqfan.eu/



More information about the SeqFan mailing list