login
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.
4

%I #19 Jul 07 2024 13:44:18

%S 2,3,11,5,37,7,268435463,6569,521,11,36028797018963979,13,

%T 859935929762876868984659981,4807339234680508004200143948920808143,

%U 32783,17,30491346729331195921,19,32064977213018365645815827,147808829414345923316083210206383297621

%N 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.

%C A072883 is the main entry for the problem of finding the smallest prime of the form k^n + n: many such k (up to n = 750 and beyond) are listed in the b-file there, but the corresponding primes are too large to list more of them here. - _M. F. Hasler_, Jul 07 2024

%H Barry Carter, <a href="https://www.reddit.com/r/OEIS/comments/13bw3q4/tweaks_to_a084047_request">Tweaks to A084047 (request)</a>, in r/OEIS on reddit.com, May 8, 2023.

%F In general, if n+1 is prime, then a(n) = n + 1 = 1^n + n.

%F a(n) = A072883(n)^n + n if A072883(n) is not 0, otherwise 0. - _Michel Marcus_, Mar 27 2020

%e a(2) = 3 = 1^2 + 2; a(4) = 5 = 1^4 + 4; a(6) = 7 = 1^6 + 6.

%t 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 *)

%o (PARI) A084047(n, k=A072883(n))=if(k, k^n + n, 0) \\ _M. F. Hasler_, Jul 07 2024

%Y Cf. A084046, A072883.

%K nonn,less

%O 1,1

%A _Amarnath Murthy_ and Meenakshi Srikanth (menakan_s(AT)yahoo.com), May 26 2003

%E Corrected and extended by _Ray Chandler_, Jun 16 2003

%E One more term from _Michel Marcus_, Mar 27 2020