login
Smallest prime of the form (n^k - k^n) for k > 1, or 1 if no such prime exists.
4

%I #9 Jun 13 2021 10:18:38

%S 1,7,17,1,6102977801,162287,79792265017612001,8375575711,2486784401

%N Smallest prime of the form (n^k - k^n) for k > 1, or 1 if no such prime exists.

%C a(10) = 10^273 - 273^10 is too large to include.

%C a(16) = 1 because primes of the form (16^k - k^16) do not exist, since 16^k - k^16 = (4^k - k^4)(4^k + k^4).

%C The corresponding numbers k such that a(n) = (n^k - k^n) are listed in A128355, where k = 0 corresponds to a(n) = 1.

%C Currently a(n) is not known for n = {17, 18, 22, 25, 26, 27, 28, ...}.

%e a(1) = 1 because (1^k - k^1) = (1 - k) < 0 for k > 1.

%e a(2) = 7 because 2^5 - 5^2 = 7 is prime, but (2^k - k^2) is not prime for 1 < k < 5, (2^2 - 2^2) = 0, (2^3 - 3^2) = -1, (2^4 - 4^2) = 0.

%e a(4) = 1 because no prime of the form (4^k - k^4) exists; 4^k - k^4 = (2^k - k^2)*(2^k + k^2).

%e a(12) = 83695120256591 = 12^13 - 13^12 = A024152(A122003(2)).

%Y Cf. A024152, A122003.

%Y Cf. A128355.

%K nonn

%O 1,2

%A _Alexander Adamchuk_, Sep 24 2006, corrected Mar 03 2007