login
A245634
Least number k such that (n^k-k^n)/(k-n) is prime, or 0 if no such number exists.
0
0, 6, 4, 3, 3, 2, 3, 0, 5, 7, 3, 13, 11, 0, 17, 0, 15, 0, 7, 0, 0, 15, 5, 0, 79, 0, 0, 0, 15, 0, 0, 0, 65, 0, 47, 0, 39, 0, 37, 0, 9, 0, 0, 45, 44, 0, 11, 0, 103, 0, 71, 0, 11, 0, 119, 0, 5, 0, 0, 0, 0, 0, 0, 0, 33, 0, 75, 0, 77, 0, 51, 143, 0, 0, 67, 0, 69, 0, 25, 0, 131, 0, 0, 0, 57, 0, 8887, 0, 221, 0, 291, 0, 0, 0, 0, 0, 101, 0, 0
OFFSET
1,2
COMMENTS
a(1) = 0 is the only confirmed 0 in this sequence.
a(n) = 0 for n > 1 is confirmed for k < 10000.
If a(n) = m, then a(m) <= n for m > 0 and n > 0.
EXAMPLE
(2^1-1^2)/(1-2) = -1 is not prime.
(2^3-3^2)/(3-2) = -1 is not prime.
(2^4-4^2)/(4-2) = 0 is not prime.
(2^5-5^2)/(5-2) = 7/3 is not prime.
(2^6-6^2)/(6-2) = 7 is prime. Thus a(2) = 6.
PROG
(PARI)
a(n)=for(k=1, 10^4, if(k!=n, s=(n^k-k^n)/(k-n); if(floor(s)==s, if(ispseudoprime(s), return(k)))))
n=1; while(n<100, print1(a(n), ", "); n++)
CROSSREFS
Cf. A242922.
Sequence in context: A329081 A343461 A155044 * A182618 A118227 A199429
KEYWORD
nonn
AUTHOR
Derek Orr, Jul 28 2014
STATUS
approved