I understand how I can use the prime number theorem to determine how many primes exist for a given bit length: $\pi(2^n)-\pi(2^{n-1})$.
However, my specific problem is that I need to approach this in the exact opposite direction. Say I have a number of objects, and each object in the set of size $x$ is mapped to (identified by) a prime number. There may be multiple instances of each object, but there are $x$ unique types of objects (for example, if I have several each of apples and bananas, $x=2$; adding more apples or bananas will not increase $x$, but adding an orange means now $x=3$). Each prime number must be unique, as it is used to uniquely identify the type of object, and each prime must have exactly the same number of bits. This means, naturally, that I can't just choose the first $x$ prime numbers, as they will differ in bit length.
Lastly, I will be performing arithmetic on these numbers such that space becomes a concern, even just in theory. Assume that the $x$ is known ahead of time and will not change until the next time I run the program, so it is not necessary to have extra primes, so $\pi(2^n)-\pi(2^{n-1}) = x$ is perfectly acceptable. We don't need to worry about adding more, only that we have enough in the first place, in as little space as possible.
Therefore, I ultimately need to find the smallest possible $n$ such that $\pi(2^n)-\pi(2^{n-1}) \geq x$ (or at least the smallest possible $n$ such that that can be assumed to be true within some level of confidence, if it is unfeasible to be completely sure) given an arbitrary $x$. Just one final note: $x$ is likely to be small, in most cases $5 \leq x \leq 30$. However, this would ideally be scalable, which is why I want to figure this out algorithmically rather than storing and referencing precalculated data.