login

Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.

A084745
Smallest prime of the form n^k - k, or 0 if no such prime exists.
3
2, 2, 3, 23, 5, 47, 7, 79, 997, 5559917313492231463, 11, 167, 13, 223, 4093, 24137563, 17, 359, 19, 439, 10947877107572929152919737180202022857988400441953615831
OFFSET
2,1
COMMENTS
a(11) > 379749833583227. Conjecture: No entry is zero.
a(23) is 150 digits long and too long to include. - Alec Mihailovs (Alec(AT)Mihailovs.com), Jun 16 2003
If n-1 is a prime then a(n)=n-1. - Farideh Firoozbakht, Aug 09 2014
LINKS
FORMULA
a(n) = n^A084746(n) - A084746(n). - Michel Marcus, Aug 09 2014
EXAMPLE
a(7) = 47 = 7^2 - 2.
MAPLE
a := proc(n) local k; k := 1; while not isprime(n^k-k) do k := k+1 od; n^k-k end: seq(a(n), n=2..35);
MATHEMATICA
sp[n_]:=Module[{k=1}, While[!PrimeQ[n^k-k], k++]; n^k-k]; Array[sp, 21, 2] (* Harvey P. Dale, Jul 22 2021 *)
PROG
(PARI) a(n)=my(k=1); while(!ispseudoprime(n^k-k), k++); return(n^k-k)
vector(20, n, a(n+1)) \\ Derek Orr, Aug 08 2014
CROSSREFS
Cf. A084746.
Sequence in context: A323609 A087768 A113604 * A192434 A189254 A036503
KEYWORD
nonn
AUTHOR
Amarnath Murthy and Meenakshi Srikanth (menakan_s(AT)yahoo.com), Jun 15 2003
EXTENSIONS
More terms from Alec Mihailovs (Alec(AT)Mihailovs.com), Jun 16 2003
STATUS
approved