Program to find the Nth term of the series 0 , 3 / 1 , 8 / 3 , 15 / 5. . ... ... | Java implementation of the approach ; Function to return the nth term of the given series ; nth term ; Driver code
import java . util . * ; import java . lang . * ; import java . io . * ; public class GFG { static void NthTerm ( int n ) { int numerator = ( ( int ) Math . pow ( n , 2 ) ) - 1 ; int denomeanator = 2 * n - 3 ; System . out . println ( numerator + " / " + denomeanator ) ; } public static void main ( String [ ] args ) { int n = 3 ; NthTerm ( n ) ; } }