#OK to post #SMALL SAMPLE OF THE EXAMPLES IN 61-90: asympt(Psi(p), p, 3); 1 1 /1 \ ln(p) - --- - ----- + O|--| 2 p 2 | 4| 12 p \p / plot([cos(p) + sin(p), sin(p^2)], p = -2*Pi .. 2*Pi, title = 'some*trig'); with(plots); polarplot(sin(5*p), p = 0 .. 2*Pi); x = 'x'; y = 'y'; plot3d(x^2 + x*y + y^2, x = -2 .. 2, y = -2 .. 2); with(linalg); v := vector([1, 2, 3]); A := matrix(2, 3, [1, 2, 3, 4, 5, 6]); #Optional #5 MakeRSAkeyG(D1,g); that takes n (the modulus) to be a product of g distinct primes (MakeRSAkeyG(D1,2) should do the same as #MakeRSAkey(D1)) MakeRSAkeyG:=proc(D1,g) local n,d,S,m,e,start: p:=NextPrime1(rand(10^(D1-1)..10^D1-1)()): q:=NextPrime1(rand(10^(D1-1)..10^D1-1)()): if p=q then RETURN(FAIL): fi: n:=nextprime(rand(10^(5)..10^(6)+1)): m:=(p-1)*(q-1): S:=rand(m/2..m-1)(): for e from 2 to g n:=n*nextprime(n): for e from S to m-1 while gcd(e,m)>1 do od: d:=e&^(-1) mod m: [n,e,d]: end: