OFFSET
1,3
COMMENTS
Apart the three initial terms which lead to +/-1, all other terms lead to prime P(k) = k^3 - 2*k^2 + k - 1.
LINKS
R. Israel, in reply to T. Baruchel, A014206 and computer algebra systems, SeqFan list, July 4, 2019.
MATHEMATICA
Join[{0, 1, 2}, Select[Range[230], PrimeQ[((#^2 (# - 2) + # - 1))] &]] (* Vincenzo Librandi, Jul 19 2019 *)
PROG
(PARI) select( is(k)={k<3||isprime(k^2*(k-2)+k-1)}, [0..200])
(Magma) [0, 1, 2] cat [n: n in [0..220] | IsPrime((n^2*(n-2)+n-1))]; // Vincenzo Librandi, Jul 19 2019
CROSSREFS
KEYWORD
nonn
AUTHOR
M. F. Hasler, Jul 04 2019
STATUS
approved