%I #18 Jan 02 2023 12:30:54
%S 0,1,2,3,5,6,7,10,12,13,15,20,23,26,27,28,30,33,35,37,38,41,45,48,50,
%T 56,61,63,65,66,70,71,72,82,83,85,90,96,98,107,108,115,120,122,126,
%U 128,133,140,141,142,145,148,156,160,162,166,173,175,180,185,191,202,205,208,213,217,220
%N Nonnegative integers k such that k^3 - 2*k^2 + k - 1 is not composite.
%C Apart the three initial terms which lead to +/-1, all other terms lead to prime P(k) = k^3 - 2*k^2 + k - 1.
%C The polynomial Q = (((x^2-k)^2-k)^2-x-k)/(x^2 - x - k) of degree 6 has two factors of degree <= 3 when k is in A014206. This can only happen when the constant term of Q, which equals -P(k), is not prime. Therefore, A014206 is a subsequence of the complement of this sequence.
%H R. Israel, in reply to T. Baruchel, <a href="http://list.seqfan.eu/oldermail/seqfan/2019-July/018882.html">A014206 and computer algebra systems</a>, SeqFan list, July 4, 2019.
%t Join[{0, 1, 2}, Select[Range[230], PrimeQ[((#^2 (# - 2) + # - 1))] &]] (* _Vincenzo Librandi_, Jul 19 2019 *)
%o (PARI) select( is(k)={k<3||isprime(k^2*(k-2)+k-1)}, [0..200])
%o (Magma) [0,1,2] cat [n: n in [0..220] | IsPrime((n^2*(n-2)+n-1))]; // _Vincenzo Librandi_, Jul 19 2019
%Y Cf. A014206.
%K nonn
%O 1,3
%A _M. F. Hasler_, Jul 04 2019