title: How to compute Euler's totient function φ in Java?
body: <p>I'm working on making an encryption program for fun, and I'm having issues doing some of the math. I need to: "<a href="https://en.wikipedia.org/wiki/RSA_%28algorithm%29#Key_generation" rel="nofollow">Compute φ(n) = φ(p)φ(q) = (p − 1)(q − 1), where φ is Euler's totient function.</a>" (number 3).</p>
  
  <p>So I was looking at the Euler totient function link, and I couldn't figure out how to compute it. I'm doing this in Java, and something tells me there is a function I can use for φ, but i'm not sure what it is. Any help would be great.</p>
  
  <p>Thanks!</p>