A084047 Smallest prime p such that p - n is an n-th power, or 0 if no such number exists; i.e., smallest prime of the form k^n + n.
2, 3, 11, 5, 37, 7, 268435463, 6569, 521, 11, 36028797018963979, 13, 859935929762876868984659981, 4807339234680508004200143948920808143, 32783, 17, 30491346729331195921, 19, 32064977213018365645815827, 147808829414345923316083210206383297621
Offset: 1
Examples
a(2) = 3 = 1^2 + 2; a(4) = 5 = 1^4 + 4; a(6) = 7 = 1^6 + 6.
Links
- Barry Carter, Tweaks to A084047 (request), in r/OEIS on reddit.com, May 8, 2023.
Programs
-
Mathematica
f[n_] := f[n] = Module[{m=1}, While[!PrimeQ[m^n + n], m++]; Return[m^n + n]]; (* from Barry Carter in r/OEIS, May 08 2023, cf. link. - M. F. Hasler, Jul 07 2024 *)
-
PARI
A084047(n, k=A072883(n))=if(k, k^n + n, 0) \\ M. F. Hasler, Jul 07 2024
Formula
In general, if n+1 is prime, then a(n) = n + 1 = 1^n + n.
Extensions
Corrected and extended by Ray Chandler, Jun 16 2003
One more term from Michel Marcus, Mar 27 2020
Comments