finished ramanujan (#10) from cs403