1,1

The next terms are too large to be displayed:

a(5)= 1158^1158-1158!+1158+1 (n=1158), which has 3548 digits.

a(6)= 14115^14115-14115!+14115+1 (n=14115), which has 58573 digits.

No other term has been found for n<30000.

Table of n, a(n) for n=1..4.

Do[p=n^n-n!+n+1; If[PrimeQ[p], Print[p]], {n, 200}]

Sequence in context: A215436 A082973 A306747 * A082815 A115893 A323338

Adjacent sequences: A187601 A187602 A187603 * A187605 A187606 A187607

hard,nonn

Marco Ripà, Mar 11 2011

a(5) and a(6) found by Matevz Markovic, Mar 03 2014

approved