title: How do you implement the BigInteger class for your own equation?
body: <p>I have an equation that I need to write in BigInteger format. It needs to be in a for loop. This is what I have so far, but I'm not sure how to use BigInteger with it. This is the equation written to be in the for loop: i*(i+1)*(2*i+1)*(3*i*i+3*i-1)/30</p>
  
  <pre><code>public static BigInteger[] nthtetranum(int n) //This is the method using the simple formula for tetra number.
  {
  
      BigInteger[] nth = new BigInteger[n];
  
      for(int i = 0; i &lt;nth.length; i++)
      {
          //nth[i] = i*(i+1)*(2*i+1)*(3*i*i+3*i-1)/30;
          nth[i] = 
  
      }
      return nth;
  </code></pre>