Given an integer ‘n’, generate the first ‘n’ terms of the Connell Sequence.

**Connell Sequence** is the sequence formed with the first odd number, i.e 1 as its first term. The subsequent terms of the sequence are made up of the first two even numbers, i.e 2 and 4, followed by the next three odd numbers, i.e 5, 7 and 9, followed by the next four even numbers, i.e 10, 12, 14 and 16 and so on …. the sequence continues.

**Input:**

The first line contains an integer **T**, the number of test cases. For each test case, there is an integer **n.**

**Output:**

For each test case, the output is a Connell Sequence containing **n** terms.

**Constraints:**

1<=T<=100

1<=n<=10^5

**Example:
Input**

2

6

12

1 2 4 5 7 9

1 2 4 5 7 9 10 12 14 16 17 19

Author: Vanshika_pec

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.

_Shubham_Jain_06 | 404 |

maggiiiii | 315 |

Savage_19 | 310 |

ritikdagar0203 | 241 |

thanuvinu94 | 233 |

Bishnu Dev Panda | 810 |

_Shubham_Jain_06 | 715 |

okayboss | 652 |

maggiiiii | 598 |

Savage_19 | 576 |

blackshadows | 5331 |

Ibrahim Nash | 5219 |

akhayrutdinov | 5111 |

mb1973 | 4925 |

Quandray | 4547 |

Login to report an issue on this page.