Text: IN JAVA
The assignment is to write a Java program that calls a function called findA_n(int n, int a_0). The first parameter should be the index in the sequence, and the second parameter should be the initial condition. Your main() routine should return the result of findA_n() to the console window, and findA_n should be called 3 times as follows:
findA_n(5, 0);
findA_n(5, 1);
findA_n(5, 2);
The formula for a_n should be a_n = 4 * a_{n-1} - 3.
The output should be the 5th element of the sequence, a_{5}, where the initial element is 0, 1, and 2, respectively.
Your function must implement recursion, i.e. it must call itself.
You should create the following functions in Java to ultimately display a row of Pascal's triangle: (10 points)
int factorial(int n);
int nChooseR(int n, int r);
String displayPascal(int row);
In your main routine, call displayPascal(12) to display the 12th row of Pascal's triangle.
Try to make your code as compact as possible (while maintaining readability). Avoid unnecessary lines of code that don't help to accomplish the goal.