%I #28 Feb 07 2024 17:55:30
%S 1,2,3,5,7,8,158,536,4670,9795
%N Numbers k such that (k+1)^(k-1) + k is prime.
%C Next term is >= 30000.
%e 3 is in the sequence since (3+1)^(3-1) + 3 = 4^2 + 3 = 19 is prime.
%t Select[Range[600],PrimeQ[(#+1)^(#-1)+#]&] (* The program generates the first eight terms of the sequence. *) (* _Harvey P. Dale_, Feb 07 2024 *)
%o (PARI) is(n)=isprime((n+1)^(n-1)+n) \\ _Charles R Greathouse IV_, Jun 06 2017
%Y Cf. A187602 (corresponding primes).
%K nonn,hard,more
%O 1,2
%A _Matevz Markovic_, Feb 25 2014
|