Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Factorization sequence to enumerated sequence in Sage

I have the following Magma code that I want to rewrite in Sage:

Eltseq(Random(FiniteField(2^8)));

This basically produces a result like this: [ 0, 1, 0, 1, 1, 1, 0, 1 ]. The function Eltseq is defined as this in the documentation (https://magma.maths.usyd.edu.au/magma/handbook/text/166):

Given a factorization sequence f, create the enumerated sequence containing the same pairs of primes and exponents.

Any ideas how can I rewrite this line in Sage?

Factorization sequence to enumerated sequence in Sage

I have the following Magma code that I want to rewrite in Sage:

Eltseq(Random(FiniteField(2^8)));

This basically produces a result like this: the following result: [ 0, 1, 0, 1, 1, 1, 0, 1 ]. The function Eltseq is defined as this in the documentation (https://magma.maths.usyd.edu.au/magma/handbook/text/166):

Given a factorization sequence f, create the enumerated sequence containing the same pairs of primes and exponents.

Any ideas how can I rewrite this line in Sage?