%I #21 Jun 07 2021 04:50:50
%S 2,3,4,7,11,17,106,120,1907,7918
%N Numbers k >= 1 such that f(k) = k^k - (k-1)^(k-1) is prime.
%C Enoch Haga proposed studying the primality of f(k) and he already knew the first 4 solutions. C. Rivera found the next four solutions using Ubasic and the last one using PRIMEFORM. Currently f(1907) is only a probable prime number, according to PRIMEFORM.
%C No other k < 25000. - _T. D. Noe_, Jun 12 2008
%H C. Rivera, <a href="http://www.primepuzzles.net/puzzles/puzz_185.htm">Puzzle 185</a>
%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/PowerDifferencePrime.html">Power Difference Prime</a>
%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/IntegerSequencePrimes.html">Integer Sequence Primes</a>
%e 2^2 - 1^1 = 3 is prime.
%t Select[Range[2, 200], PrimeQ[ #^#-(#-1)^(#-1)]&] (* _T. D. Noe_, Jun 12 2008 *)
%o (PARI) isok(k) = ispseudoprime(k^k - (k-1)^(k-1)); \\ _Jinyuan Wang_, Mar 19 2020
%Y Cf. A007781 (n^n-(n-1)^(n-1)). Equals A140669 + 1.
%K nonn,hard,more
%O 1,1
%A _Carlos Rivera_, Jun 28 2002
%E 7918 found by _Henri Lifchitz_ in 2001, contributed by _Eric W. Weisstein_, Nov 29 2005