login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A161863
Numbers k such that k^2+k+3 and k^2+k-3 are both prime.
3
4, 7, 10, 22, 25, 34, 70, 79, 112, 130, 139, 172, 187, 217, 229, 262, 274, 295, 304, 322, 337, 364, 397, 400, 472, 499, 574, 580, 592, 622, 634, 655, 664, 697, 829, 844, 925, 1057, 1144, 1165, 1255, 1300, 1309, 1357, 1414, 1420, 1489, 1537, 1642, 1669, 1744
OFFSET
1,1
LINKS
EXAMPLE
4 is in the list because 16+4+-3 = 23 and 17 are primes.
7 is in the list because 49+7+-3 = 53 and 59 are primes.
MATHEMATICA
q=3; lst3={}; Do[p=n^2+n; If[PrimeQ[p-q]&&PrimeQ[p+q], AppendTo[lst3, n]], {n, 0, 7!}]; lst3
Select[Range[2000], AllTrue[#^2+#+{3, -3}, PrimeQ]&] (* The program uses the AllTrue function from Mathematica version 10 *) (* Harvey P. Dale, Jul 01 2019 *)
PROG
(Magma) [k:k in [1..1750]| IsPrime(k^2+k+3) and IsPrime(k^2+k-3)]; // Marius A. Burtea, Feb 17 2020
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
EXTENSIONS
Definition rephrased by R. J. Mathar, Jun 27 2009
STATUS
approved