cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A182438 Numbers n such that neither n^2+n-1 nor n^2-n-1 is prime.

This page as a plain text file.
%I A182438 #15 Sep 08 2022 08:45:55
%S A182438 1,18,23,33,34,37,43,52,58,62,63,72,73,74,75,78,79,80,81,82,88,91,92,
%T A182438 98,99,105,106,107,108,109,110,111,112,113,117,118,119,122,123,124,
%U A182438 128,129,133,136,137,143,147,151,152,157,162,166,167,168,173
%N A182438 Numbers n such that neither n^2+n-1 nor n^2-n-1 is prime.
%H A182438 Vincenzo Librandi, <a href="/A182438/b182438.txt">Table of n, a(n) for n = 1..1000</a>
%F A182438 a(n) ~ n. - _Charles R Greathouse IV_, Jun 13 2017
%e A182438 18^2+18-1=341 is not prime, and 18^2-18-1=305 is not prime, so 18 is in the sequence.
%t A182438 Select[Range[500], !PrimeQ[#^2 + # - 1] && !PrimeQ[#^2 - # - 1] &] (* _Vincenzo Librandi_, Jan 19 2013 *)
%t A182438 Select[Range[200],NoneTrue[#^2+{#-1,-#-1},PrimeQ]&] (* Requires Mathematica version 10 or later *) (* _Harvey P. Dale_, May 04 2018 *)
%o A182438 (Magma) [n: n in [1..180] | not IsPrime(n^2+n-1) and not IsPrime(n^2-n-1)]; // _Vincenzo Librandi_, Jan 19 2013
%o A182438 (PARI) is(n)=!isprime(n^2+n-1) && !isprime(n^2-n-1) \\ _Charles R Greathouse IV_, Jun 13 2017
%Y A182438 Cf. A002328, A045546.
%K A182438 nonn,easy
%O A182438 1,2
%A A182438 _Alex Ratushnyak_, Apr 28 2012