SP13753 APS - Amazing Prime Sequence
Description
Bablu is very fond of Series and Sequences...
After studying Fibonacci Series in Class IX, he was impressed and he designed his own sequence as follows...
a\[0\] = a\[1\] = 0
For n > 1, a\[n\] = a\[n - 1\] + f(n), where f(n) is smallest prime factor of n.
He is also very fond of programming and thus made a small program to find a\[n\], but since he is in Class IX, he is not very good at programming. So, he asks you for help. Your task is to find a\[n\] for the above sequence....
Input Format
Your code will be checked for multiple Test Cases.
First Line of Input contains T (
Output Format
Single line containing a\[n\] i.e. nth number of the sequence for each test case.