Sigma function is an interesting function in Number Theory. It is denoted bythe
Greek letter Sigma (σ). This function actually denotes the sum of all divisors of a
number. For example σ(24) = 1+2+3+4+6+8+12+24=60. Sigma of small numbers is easy to
find butfor large numbers itis very difficult to find in a straight forward way.
But mathematicians have discovered a formula to find sigma. If the prime power
decomposition of an integeris
>n=pe11∗pe22∗⋯∗pekk>
Then we can write,
>σ(n)=pe1+11−1p1−1∗pe2+12−1p2−1∗⋯∗pek+1k−1pk−1>
For some n thevalueof σ(n) is odd andfor others it is even. Given avalue n, you
will have to find how many integers from1to n have even valueof σ.
【Input】
Input starts withaninteger T (≤ 100), denoting thenumberof test cases.
Each case starts withaline containing aninteger n (1 ≤ n ≤ 10^12).