Annual Appeal: Please make a donation (tax deductible in USA) to keep the OEIS running. Over 4500 articles have referenced us, often saying "we would not have discovered this result without the OEIS".
%I
%S 5,6,7,13,17,171,174,378
%N Numbers n such that (n-1)^(n+1) - n^n is prime.
%C No more terms up to 10000. - _Rick L. Shepherd_, May 16 2008
%e 12^14 - 13^13 = 981043357956611, which is prime, so 13 is in the list.
%t Select[Table[n,{n,5,400}],PrimeQ[(#-1)^(#+1)-#^#]&] (* _Vladimir Joseph Stephan Orlovsky_, Mar 03 2011*)
%K hard,more,nonn
%O 1,1
%A _Carl R. White_, Feb 05 2008