login
A116214
Numbers n such that both n*(n+2)-(n+1) and n*(n+2)+(n+1) are primes.
2
2, 3, 4, 5, 8, 9, 10, 15, 19, 20, 30, 38, 44, 45, 53, 54, 55, 59, 64, 65, 85, 93, 100, 114, 125, 130, 140, 144, 148, 153, 154, 158, 159, 163, 180, 195, 218, 219, 230, 240, 258, 263, 264, 305, 330, 349, 350, 360, 373, 385, 395, 418, 419, 448, 449, 455, 473, 474
OFFSET
1,1
COMMENTS
Sequence a(k)*(a(k)+2) = 8, 15, 24, 35, 80, 99, ... equals A069826.
LINKS
EXAMPLE
20*22 = 440; both 440-21 = 419 and 440+21 = 461 are prime, hence 20 is a term.
MAPLE
select(n -> isprime(n^2+n-1) and isprime(n^2+3*n+1), [$1..1000]); # Robert Israel, Jun 11 2018
MATHEMATICA
Select[Range@ 475, AllTrue[{# (# + 2) - (# + 1), # (# + 2) + (# + 1)}, PrimeQ] &] (* Michael De Vlieger, Jun 11 2018 *)
PROG
(Magma) [ n: n in [1..500] | IsPrime(n*(n+2)+(n+1)) and IsPrime(n*(n+2)-(n+1)) ]; /* Klaus Brockhaus, Apr 17 2007 */
CROSSREFS
Cf. A005563 (n(n+2)), A069826 (numbers n such that sigma(n^2-n-1) = n*(n+1)).
Sequence in context: A087278 A054220 A337801 * A161389 A266118 A287802
KEYWORD
nonn
AUTHOR
J. M. Bergot, Apr 16 2007
EXTENSIONS
Edited and extended by Klaus Brockhaus, Apr 17 2007
STATUS
approved