I figured out that the numbers which are square of the prime numbers would be the T-Prime here. But getting wrong answer , help me out with this,
First we calculate the square root of the number, and if that is prime then the number is T-Prime
Source code link: https://pastebin.com/aAnJYdhg