Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).
%I #7 Oct 21 2017 12:45:20
%S 1,37,32,39,118,13,16,11,154,41,8,29,6,17,64,7,14,107,66,63,58,87,38,
%T 397,282,69,32,129,12,67,210,3,200,227,82,55,2,7,4,541,10,103,64,167,
%U 286,71,60,593,6,459,14,3,2,91,4,81,98,21,164,47,36,51,10,15,84,19,30
%N Least number k such that k^64+n^64 is prime.
%C If a(n) = 1, then n is in A006316.
%t lnk[n_]:=Module[{c=n^64,k=1},While[!PrimeQ[c+k^64],k++];k]; Array[lnk,70] (* _Harvey P. Dale_, Oct 21 2017 *)
%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**64+k**64):
%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^3,if(ispseudoprime(n^64+k^64),return(k)));
%o n=1;while(n<100,print(a(n));n+=1)
%Y Cf. A069003, A006316.
%K nonn
%O 1,2
%A _Derek Orr_, May 17 2014