A084746 Smallest k such that n^k - k is a prime, or 0 if no such number exists.
2, 1, 1, 2, 1, 2, 1, 2, 3, 18, 1, 2, 1, 2, 3, 6, 1, 2, 1, 2, 41, 110, 1, 18, 3, 2, 11, 2, 1, 24, 1, 2, 3, 2, 107827, 2, 1, 8, 3, 24, 1, 2, 1, 514, 6737, 2, 1, 2, 5521, 140, 15, 108, 1, 2, 15, 82, 35
Offset: 2
Links
- Henri Lifchitz & Renaud Lifchitz, 36^107827-107827, a(36).
Crossrefs
Cf. A084745.
Programs
-
Maple
a := proc(n) local k; k := 1; while not isprime(n^k-k) do k := k+1 od; k end: seq(a(n),n=2..35);
-
Mathematica
f[n_] := Block[{k = 1}, If[OddQ[n], k++ ]; While[ ! PrimeQ[n^k - k], k += 2]; k]; Table[ f[n], {n, 3, 35}]
Extensions
Edited and extended by Robert G. Wilson v, Alec Mihailovs (Alec(AT)Mihailovs.com) and T. D. Noe, Jun 16 2003
a(36)-a(58) from Kellen Shenton, Aug 14 2023
Comments