login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A242557 Least number k such that n^128+k^128 is prime. 1

%I #10 Jun 18 2020 09:17:14

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

%T 27,88,139,632,47,44,643,20,209,606,1529,32,31,1094,139,754,647,38,37,

%U 262,69,94,631,90,25,38,195,10,277,232,187,554,189,10,47,216,131,1132,173,390

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

%C If a(n) = 1, then n is in A056994.

%t lnk[n_]:=Module[{c=n^128,k},k=If[EvenQ[c],1,2];While[!PrimeQ[c+ k^128],k = k+2];k]; Join[{1},Array[lnk,60,2]] (* _Harvey P. Dale_, Mar 17 2015 *)

%o (Python)

%o import sympy

%o from sympy import isprime

%o def a(n):

%o for k in range(10**4):

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

%o return k

%o n = 1

%o while n < 100:

%o print(a(n))

%o n += 1

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

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

%Y Cf. A069003, A056994.

%K nonn

%O 1,2

%A _Derek Orr_, May 17 2014

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 19 11:14 EDT 2024. Contains 371791 sequences. (Running on oeis4.)