login

Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.

Numbers k such that k^2 +-5 are primes.
6

%I #7 Feb 27 2020 12:18:23

%S 6,12,36,72,78,168,198,204,342,432,456,492,534,588,594,666,726,756,

%T 786,804,996,1014,1212,1218,1248,1254,1266,1314,1344,1476,1512,1554,

%U 1806,1812,1902,2088,2298,2322,2364,2616,2634,3066,3072,3162,3432,3444,3852

%N Numbers k such that k^2 +-5 are primes.

%H Daniel Starodubtsev, <a href="/A176681/b176681.txt">Table of n, a(n) for n = 1..10000</a>

%e 12 is in the sequence, because 12^2 + 5 = 149 and 12^2 - 5 = 139 are primes.

%t Select[Range[8! ],PrimeQ[ #^2-5]&&PrimeQ[ #^2+5]&]

%Y Cf. A097698, A108701

%K nonn

%O 1,1

%A _Vladimir Joseph Stephan Orlovsky_, Apr 23 2010