Sophie Germain primes and safe primes
A Sophie Germain prime is a prime $p$ such that $2p+1$ is prime (that later prime is deemed a safe prime). For small examples, see A005384 in the OEIS.

A random integer $n$ has odds commensurate to $1/\log(n)^2$ to be a Sophie Germain prime. Therefore, there's in the order of $2^{495}$ Sophie Germain primes of 511 bits, way too much to enumerate them, much less store them in a database.

In order to find a Sophie Germain prime that will allow to calculate safe prime of $k=$512, 768, 1024, 2048, 4096 bits, one can simply repeatedly find a random prime $p$ of $k-1$ bits, until $2p+1$ is prime (or repeatedly find a random $k$-bit prime $p$, until $(p-1)/2$ is prime); the smallest of the two related primes exhibited is the Sophie Germain prime, the other is the safe prime.

A large speedup is possible by sieving with small primes, noticing that $p$ and $2p+1$ being large primes implies $p$ odd; $p\bmod3=2$; $p\bmod5\in\{1,3,4\}$; and more generally $p\bmod q\not\in\{0,(q-1)/2\}$ for any small odd prime $q$.

For cryptographic applications, one can use the Miller-Rabin primality test.