Like in the prime number theorem, but only with prime squares. It is an equation made out of the Sieve of Eratosthenes where x is the number of primes to the given prime’s square. Take a prime, in this case 7, and square it to 49. There are 3 primes before 7: 2, 3, 5. Multiply 49 by one-half (1/2), then by two-thirds (2/3) and by four-fifths (4/5). The result is 13 (rounded). Add three because there are three primes before 7 (2,3,5) and subtract 1 because 1 is not a prime. The result is 15. There are also 15 primes up to 49. This looks good at first but if you do the same with larger primes it starts to get more and more inaccurate. The reason is simple: after you subtract all the numbers divisible by two (multiply by two) from the set of numbers, one third of the remaining numbers are divisible by 3. If you subtract the numbers divisible by three (multiply the remaining by 2/3) and repeat this with all the following primes, you will get the problem starting from 7, because although it is still true for long sequences of numbers that exactly one seventh of the remaining numbers is divisible by seven, it is not true for short sequences, because there are not always 6 remaining numbers between two multiples of 7 (the gap can be more or less, it only true with sequent 2x3x5x7 that it evens out to every seventh on average). For example right at the beginning of the number series there is a big gap between a prime and the first multiple of it remaining (in case of 7 the first multiple of it that is not crossed out is 7 to the square = 49) and it has a big distortion to the result.
The equation in case the prime is 7: x = 7^2 * (1/2) * (2/3) * (4/5) + 3 - 1