One way to approach this, and related seqs, is in a web page with 34 links to OEIS: Weisstein, Eric W. "Near-Square Prime." From MathWorld--A Wolfram Web Resource. http://mathworld.wolfram.com/Near-SquarePrime.html