A163492 Numbers such that the two adjacent integers are a perfect square and a prime.
1, 2, 3, 8, 10, 24, 48, 80, 82, 168, 224, 226, 360, 440, 442, 728, 840, 1088, 1090, 1224, 1368, 1522, 1848, 2026, 2208, 2400, 3024, 3250, 3720, 3968, 4760, 5040, 5624, 5928, 6562, 7920, 8648, 9802, 10608, 11026, 11448, 12322, 13688, 13690, 14160, 14640
Offset: 1
Keywords
Examples
a(1) = 2 since 2 lies between 1(square) and 3(prime). a(2) = 3 since 3 lies between 2(prime) and 4(square).
Links
- T. D. Noe, Table of n, a(n) for n = 1..1000
- Planet Math, Beprisque numbers
Programs
-
Mathematica
nn = 100; Sort[Select[Range[0, nn], PrimeQ[#^2 + 2] &]^2 + 1, Select[Range[nn], PrimeQ[#^2 - 2] &]^2 - 1] (* T. D. Noe, Aug 29 2012 *) Select[Range[15000],AnyTrue[#+{1,-1},PrimeQ]&&AnyTrue[{Sqrt[#-1],Sqrt[ #+1]},IntegerQ]&] (* Harvey P. Dale, Feb 06 2023 *)
Extensions
Definition clarified by R. J. Mathar, Aug 08 2009
Number 1 added by WG Zeist, Aug 28 2012
Comments