The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation. Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A225766 Least k>0 such that k^4+n is prime, or 0 if k^4+n is always composite. 4

%I

%S 0,1,1,2,1,6,1,2,3,10,1,6,1,2,165,2,1,12,1,20,3,2,1,6,35,2,3,2,1,90,1,

%T 2,3,8,5,12,1,2,9,10,1,60,1,2,75,2,1,18,5,20,3,2,1,12,85,2,3,2,1,30,1,

%U 4,21,2,0,6,1,2,3,10,1,6,1,2,255,4,3,6,1,10,27,2,1,72,5,2,3,2,1,570,11,2,3,2,5,18,1,2,3,10

%N Least k>0 such that k^4+n is prime, or 0 if k^4+n is always composite.

%C See A225768 for motivation and references.

%e a(4)=1 because 1^4+4=5 is prime. (Although x^4+4 = (x^2-2*x+2)(x^2+2x+2), this is prime for x=1 when the first factor equals 1.)

%e a(5)=6 because 1^4+5=6, 2^4+5=21, 3^4+5=86, 4^4+5=261 and 5^4+5 are all composite, but 6^4+5=1301 is prime.

%e a(64)=0 because x^4+64 = (x^2-4*x+8)(x^2+4x+8) is composite for all integer values of x>0. Indeed, x^2-4x+8=(x-2)^2+4 > 1 for all x.

%o (PARI) {(a,b=4)->#factor(x^b+a)~==1&for(n=1,9e9,ispseudoprime(n^b+a)&return(n));a==1 || a==4 || print1("/*"factor(x^b+a)"*/")} \\ For illustrative purpose only. The polynomial is factored to avoid an infinite search loop when it is composite. But a factored polynomial can yield a prime when all but one factors equal 1. This happens for n=4, cf. Example.

%Y See A085099, A225765--A225770 for the k^2, k^3, ..., k^8 analogs.

%K nonn

%O 0,4

%A _M. F. Hasler_, Jul 25 2013

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

Last modified January 27 14:39 EST 2020. Contains 331295 sequences. (Running on oeis4.)