Prime Number Calculator

This is a very simple prime-number calculator, based on a Java applet. "View Source" to see how HTML and JavaScript interact with the Java applet. (The Java source code is available here; the HTML/JavaScript source here.) The primary purpose of this calculator is an example of what Netscape calls "LiveConnect" (Java/JavaScript/HTML interaction; it's also supported in Microsoft Internet Explorer), to accompany a forthcoming article on JavaScript by Andrew Schulman, for Web Review.

The x and y values can be full JavaScript expressions, such as Math.pow(2,31)-1 to verify that Mersenne(31) is prime, or Math.pow(2,47)-1 to see the factors of Mersenne(47).

x: y: