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.

A242555 Least number k such that k^32 + n^32 is prime.

This page as a plain text file.
%I A242555 #14 Dec 26 2024 19:00:35
%S A242555 1,29,40,33,34,131,50,9,8,11,10,13,12,97,166,221,200,13,10,61,176,23,
%T A242555 22,65,94,151,352,87,2,1,38,39,4,5,48,137,18,11,4,3,60,55,40,9,106,33,
%U A242555 10,29,134,7,44,33,50,1,38,5,148,37,2,41,10,11,94,75,4,5,100,5,22
%N A242555 Least number k such that k^32 + n^32 is prime.
%C A242555 If a(n) = 1, then n is in A006315.
%t A242555 lnk[n_]:=Module[{k=1,n32=n^32},While[!PrimeQ[n32+k^32],k++];k]; Array[ lnk,70] (* _Harvey P. Dale_, Apr 26 2018 *)
%o A242555 (Python)
%o A242555 import sympy
%o A242555 from sympy import isprime
%o A242555 def a(n):
%o A242555   for k in range(10**4):
%o A242555     if isprime(n**32+k**32):
%o A242555       return k
%o A242555 n = 1
%o A242555 while n < 100:
%o A242555   print(a(n))
%o A242555   n += 1
%o A242555 (PARI) a(n)=for(k=1,oo,if(ispseudoprime(n^32+k^32),return(k)));
%Y A242555 Cf. A069003, A006315.
%K A242555 nonn
%O A242555 1,2
%A A242555 _Derek Orr_, May 17 2014