cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A242556 Least number k such that k^64 + n^64 is prime.

This page as a plain text file.
%I A242556 #12 Dec 26 2024 19:53:33
%S A242556 1,37,32,39,118,13,16,11,154,41,8,29,6,17,64,7,14,107,66,63,58,87,38,
%T A242556 397,282,69,32,129,12,67,210,3,200,227,82,55,2,7,4,541,10,103,64,167,
%U A242556 286,71,60,593,6,459,14,3,2,91,4,81,98,21,164,47,36,51,10,15,84,19,30
%N A242556 Least number k such that k^64 + n^64 is prime.
%C A242556 If a(n) = 1, then n is in A006316.
%t A242556 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 A242556 (Python)
%o A242556 import sympy
%o A242556 from sympy import isprime
%o A242556 def a(n):
%o A242556   for k in range(10**4):
%o A242556     if isprime(n**64+k**64):
%o A242556       return k
%o A242556 n = 1
%o A242556 while n < 100:
%o A242556   print(a(n))
%o A242556   n += 1
%o A242556 (PARI) a(n)=for(k=1,oo,if(ispseudoprime(n^64+k^64),return(k)));
%Y A242556 Cf. A069003, A006316.
%K A242556 nonn
%O A242556 1,2
%A A242556 _Derek Orr_, May 17 2014