MediaWiki:Factor

  function a38factor5(a38factor6) { var n; var p = "1"; for(n=2;n<=Math.sqrt(a38factor6);n++){ if(a38factor6%n==0){ p+=", "+n.toString; } } for(n=Math.sqrt(a38factor6);n>=1;n--){ if(a38factor6%n==0){ p+=", "+(a38factor6/n).toString; } } return p; } function a38factor3 { document.getElementById("a38factor4").innerHTML=a38factor5(parseInt(document.a38factor1.a38factor2.value)); }