login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A182438 Numbers n such that neither n^2+n-1 nor n^2-n-1 is prime. 1
1, 18, 23, 33, 34, 37, 43, 52, 58, 62, 63, 72, 73, 74, 75, 78, 79, 80, 81, 82, 88, 91, 92, 98, 99, 105, 106, 107, 108, 109, 110, 111, 112, 113, 117, 118, 119, 122, 123, 124, 128, 129, 133, 136, 137, 143, 147, 151, 152, 157, 162, 166, 167, 168, 173 (list; graph; refs; listen; history; text; internal format)
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

Cf. A002328, A045546.

Sequence in context: A267826 A339473 A002505 * A050772 A086473 A271327

Adjacent sequences:  A182435 A182436 A182437 * A182439 A182440 A182441

KEYWORD

nonn,easy

AUTHOR

Alex Ratushnyak, Apr 28 2012

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified July 24 23:25 EDT 2021. Contains 346273 sequences. (Running on oeis4.)