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.

A291689 Numbers n such that n^2 +- n +- 1 are all composite.

This page as a plain text file.
%I A291689 #12 Aug 30 2017 01:54:12
%S A291689 23,37,43,52,73,74,82,88,92,98,107,108,109,113,122,123,124,128,129,
%T A291689 133,136,137,152,157,166,178,179,183,198,201,202,205,208,211,212,213,
%U A291689 214,217,222,223,224,227,228,229,235,238,239,243,250,251,252,253,254,255,256,257,261,262,270,271,274
%N A291689 Numbers n such that n^2 +- n +- 1 are all composite.
%C A291689 Numbers n such that A291654(n)=1.
%C A291689 Complement of union of A002328, A002384, A045546 and A055494.
%H A291689 Robert Israel, <a href="/A291689/b291689.txt">Table of n, a(n) for n = 1..10000</a>
%F A291689 a(n) ~ n. - _Charles R Greathouse IV_, Aug 30 2017
%e A291689 a(1)=23 is in the sequence because 23^2 - 23 - 1 = 505, 23^2 - 23 + 1 = 507, 23^2 + 23 - 1 = 551, 23^2 + 23 + 1 = 553 are all composite.
%p A291689 select(t -> not ormap(isprime, {t^2+t+1,t^2+t-1,t^2-t+1,t^2-t-1}), [$1..1000]);
%t A291689 Select[Range@ 300, Function[t, AllTrue[t^2 + Map[Total[{t, 1} #] &, Tuples[{1, -1}, 2]], ! PrimeQ@ # &]]] (* _Michael De Vlieger_, Aug 29 2017 *)
%o A291689 (PARI) is(n)=my(n2=n^2); !isprime(n2+n+1) && !isprime(n2+n-1) && !isprime(n2-n+1) && !isprime(n2-n-1) \\ _Charles R Greathouse IV_, Aug 30 2017
%Y A291689 Cf. A002328, A002384, A045546, A055494, A291654.
%K A291689 nonn
%O A291689 1,1
%A A291689 _Robert Israel_, Aug 29 2017