G.F Series
Submissions: 5784   Accuracy:

27.74%

  Difficulty: Basic   Marks: 1

Siddhant made a special series and named it as G.F Series.The series follows this trend  Tn=(Tn-2)2-(Tn-1)  in which the first and the second term are 0 and 1 respectively.Help Siddhant to find  upto N terms of the series .

Input:
First line contain T, number of test cases.
Second line contains an integer upto which series will run.

Output:
Print all the terms which will occur in the series(upto N).

Constraints:
1 <= T <= 100

1 <= N <= 15
Example:
Input:
3
3
6
2

Output:
0 1 -1
0 1 -1 2 -1 5 
0 1

 

** For More Input/Output Examples Use 'Expected Output' option **

Author: Sangeet Singh


If you have purchased any course from GeeksforGeeks then please ask your doubt on course discussion forum. You will get quick replies from GFG Moderators there.



Need help with your code? Please use ide.geeksforgeeks.org, generate link and share the link here.


to report an issue on this page.