A239474 Smallest k >= 1 such that k^n-n is prime. a(n) = 0 if no such k exists.
3, 2, 2, 0, 4, 5, 60, 3, 2, 21, 28, 5, 2, 199, 28, 0, 234, 11, 2, 3, 2, 159, 10, 31, 68, 145, 0, 69, 186, 163, 32, 253, 26, 261, 4, 0, 8, 11, 62, 3, 22, 43, 6, 7, 8, 945, 76, 7, 116, 129, 382, 93, 330, 361, 2, 555, 224, 1359, 78, 29, 62, 39, 110, 0, 1032, 37, 462, 29
Offset: 1
Keywords
Examples
1^1-1 = 0 is not prime. 2^1-1 = 1 is not prime. 3^1-1 = 2 is prime. Thus, a(1) = 3.
Programs
-
Python
import sympy from sympy import isprime def TwoMin(x): for k in range(1,5000): if isprime(k**x-x): return k x = 1 while x < 100: print(TwoMin(x)) x += 1
Formula
a(A097764(n)) = 0 for all n.
Comments