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.

A242552 Least number k such that n^4 + k^4 is prime.

This page as a plain text file.
%I A242552 #10 Dec 26 2024 19:27:54
%S A242552 1,1,2,1,2,1,2,3,2,7,2,13,4,5,8,1,2,5,2,1,10,15,2,1,6,3,2,1,12,7,12,5,
%T A242552 14,1,6,7,2,3,14,9,2,5,10,21,2,1,4,1,2,7,2,11,6,1,14,1,2,7,2,11,2,11,
%U A242552 8,23,16,29,12,3,10,27,2,5,8,1,8,3,20,17,2,1,10,1,10
%N A242552 Least number k such that n^4 + k^4 is prime.
%C A242552 If a(n) = 1, then n is in A000068.
%e A242552 8^4+1^4 = 4097 is not prime. 8^4+2^4 = 4112 is not prime. 8^4+3^4 = 4177 is prime. Thus, a(8) = 3.
%o A242552 (Python)
%o A242552 import sympy
%o A242552 from sympy import isprime
%o A242552 def a(n):
%o A242552   for k in range(10**4):
%o A242552     if isprime(n**4+k**4):
%o A242552       return k
%o A242552 n = 1
%o A242552 while n < 100:
%o A242552   print(a(n))
%o A242552   n += 1
%o A242552 (PARI) a(n)=for(k=1,oo,if(ispseudoprime(n^4+k^4),return(k)));
%Y A242552 Cf. A069003, A000068.
%K A242552 nonn
%O A242552 1,3
%A A242552 _Derek Orr_, May 17 2014