Squares and divisibility
Submissions: 293   Accuracy:

11.6%

  Difficulty: Easy   Marks: 2

You will be given a positive integer N.Your task is to find the number of pairs of non negative integers (a,b), 1 ≤  a < b  ≤  N such that a divides b2 - 1 and b divides a2 - 1.

Input:
The first line of input contains a single integer T denoting the number of test cases. Then T test cases follow. Each test case consists of exactly one line which has a single positive integer N.


Output:

Corresponding to each test case, in a new line, print the number of such pairs.


Constraints:

1 ≤ T ≤ 200

2 ≤ N ≤ 105      


Example:

Input

3
6
7
100

Output

9
11
208

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

Author: Hemang Sarkar


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.