For a library, I need to store the first primes numbers up to a limit L. This collection must have a O(1) lookup time (to check whether a number is prime or not) and it must
Given that memory is so cheap, I don't think you can do much better from a speed perspective than your existing scheme.
If there's a better solution, then I'd assume it'd take advantage of the Prime Number Theorem that shows that as L gets bigger, the limit of
π(L) / (L / ln(L)) approaches 1.
Perhaps a better solution would have an adaptive packing solution in a data structure sort of like a skip list.