Wrote function to perform an exponent of a BigInteger and to generate a random number of a given size