Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Generate a random integer with some condition

I want to generate a random integer of bitsize $n$ with some condition. For example, if we want to generate an integer $e$ of 71 bits satisfying $3e= 1 \bmod 5$, in which the generation is fast to some extent. How to do this in sage.