Function to count integers upto k which are having perfect squares as factors . i is index of next prime number whose square needs to be checked . curr is current number whos square to be checked .
static long countSquares ( long i , long cur , long k , List < long > a ) {