OFFSET
1,2
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 1..1000
FORMULA
a(n) ~ n. - Charles R Greathouse IV, Jun 13 2017
EXAMPLE
18^2+18-1=341 is not prime, and 18^2-18-1=305 is not prime, so 18 is in the sequence.
MATHEMATICA
Select[Range[500], !PrimeQ[#^2 + # - 1] && !PrimeQ[#^2 - # - 1] &] (* Vincenzo Librandi, Jan 19 2013 *)
Select[Range[200], NoneTrue[#^2+{#-1, -#-1}, PrimeQ]&] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, May 04 2018 *)
PROG
(Magma) [n: n in [1..180] | not IsPrime(n^2+n-1) and not IsPrime(n^2-n-1)]; // Vincenzo Librandi, Jan 19 2013
(PARI) is(n)=!isprime(n^2+n-1) && !isprime(n^2-n-1) \\ Charles R Greathouse IV, Jun 13 2017
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Alex Ratushnyak, Apr 28 2012
STATUS
approved