login
A154732
Integers k such that (k^3 + k^2) -+ 1 are primes.
1
2, 5, 9, 11, 12, 26, 44, 47, 62, 69, 71, 89, 125, 140, 147, 179, 219, 254, 264, 285, 294, 312, 317, 326, 341, 344, 384, 407, 461, 495, 659, 680, 714, 740, 837, 845, 861, 866, 867, 957, 989, 1071, 1079, 1152, 1215, 1310, 1437, 1481, 1499, 1511, 1530, 1577
OFFSET
1,1
EXAMPLE
2^3 + 2^2 = 12 -+ 1 = 11 and 13 (both prime).
MATHEMATICA
lst={}; Do[k=n^3+n^2; If[PrimeQ[k-1]&&PrimeQ[k+1], AppendTo[lst, n]], {n, 8!}]; lst
Select[Range[3000], PrimeQ[#^3 + #^2 - 1] && PrimeQ[#^3 + #^2 + 1] &] (* Vincenzo Librandi, Dec 26 2015 *)
PROG
(Magma) [n: n in [1..5*10^3] |IsPrime(n^3+n^2-1) and IsPrime(n^3+n^2+1)]; // Vincenzo Librandi, Dec 26 2015
(PARI) isok(n) = isprime(n^3+n^2+1) && isprime(n^3+n^2-1); \\ Michel Marcus, Dec 27 2015
CROSSREFS
Sequence in context: A332821 A283481 A284875 * A242936 A080154 A069829
KEYWORD
nonn,easy
AUTHOR
STATUS
approved