login
Least number k > n such that k^128 + n^128 is prime.
1

%I #14 Jun 19 2020 16:28:05

%S 120,113,106,259,304,85,212,135,158,47,62,985,84,47,518,485,178,169,

%T 106,27,88,139,632,47,44,643,194,209,606,1529,32,113,1094,139,754,647,

%U 38,45,262,69,94,631,90,527,326,195,54,277,232,187,554,189,78,799,216,131,1132,173

%N Least number k > n such that k^128 + n^128 is prime.

%C a(n) = n+1 iff n is in A215431.

%H Jens Kruse Andersen, <a href="/A244950/b244950.txt">Table of n, a(n) for n = 1..1000</a>

%e The n-value for which n^128 + 1 is prime (sequence A056994) is n = 120 (where n > 1 by definition). Thus a(1) = 120.

%t lnk[n_]:=Module[{k=n+1,n128=n^128},While[!PrimeQ[n128+k^128],k++];k]; Array[lnk,60] (* _Harvey P. Dale_, Apr 22 2018 *)

%o (Python)

%o import sympy

%o from sympy import isprime

%o def a(n):

%o for k in range(n+1,10**4):

%o if isprime(k**128+n**128):

%o return k

%o for n in range(1, 100):

%o print(a(n), end=', ')

%o (PARI) a(n)=for(k=n+1,10^4,if(isprime(k^128+n^128),return(k)))

%o n=1;while(n<100,print1(a(n),", ");n++)

%Y Cf. A158979, A089489, A242557.

%K nonn

%O 1,1

%A _Derek Orr_, Jul 08 2014