Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.
%I #19 Sep 08 2022 08:45:29
%S 1,2,4,6,10,14,18,20,24,34,46,50,56,58,70,72,78,84,92,108,112,116,142,
%T 146,150,168,172,176,178,186,188,190,204,230,238,240,242,244,252,270,
%U 276,284,286,296,304,310,328,342,350,352,354,370,378,384,388,400,406
%N Numbers k such that k^3 + k^2 + k - 1 is prime.
%H Robert Israel, <a href="/A125964/b125964.txt">Table of n, a(n) for n = 1..10000</a>
%p filter:= k -> isprime(k^3+k^2+k-1):
%p select(filter, [1,seq(i,i=2..10000,2)]); # _Robert Israel_, Oct 07 2019
%t Do[If[PrimeQ[ -1+n+n^2+n^3],Print[n]],{n,1,300}]
%o (Magma) [n: n in [0..1000] | IsPrime(n^3+n^2+n-1)] // _Vincenzo Librandi_, Nov 23 2010
%o (PARI) is(n)=isprime(n^3+n^2+n-1) \\ _Charles R Greathouse IV_, Feb 17 2017
%Y Cf. A045546, A125965-A125973.
%K nonn
%O 1,2
%A _Artur Jasinski_, Dec 13 2006
%E More terms from _Vincenzo Librandi_, Mar 26 2010