A225770 Least k > 0 such that k^8 + n is prime, or 0 if there is no such k.
0, 1, 1, 4, 1, 12, 1, 2, 3, 110, 1, 6, 1, 2, 195, 2, 1, 6, 1, 40, 3, 2, 1, 66, 25, 2, 9, 2, 1, 180, 1, 22, 15, 58, 25, 408, 1, 2, 3, 10, 1, 12, 1, 4, 465, 4, 1, 12, 5, 10, 147, 2, 1, 6, 35, 2, 45, 2, 1, 570, 1, 2, 21, 4, 0, 6, 1, 6, 9, 100, 1
Offset: 0
Keywords
Examples
a(0) = 0 since k^8 is not prime for any k > 0. a(4) = 1 since k^8 + 4 is prime for k = 1, although k^8 + 4 = (k^4 - 2k^2 + 2)(k^4 + 2k^2 + 2), but the first factor equals 1 for k = 1. a(64) = 0 since k^8 + 64 = (k^4 - 4*k^2 + 8)(k^4 + 4k^2 + 8) which is composite for all integers k > 1.
Programs
-
PARI
A225770(a,b=8)={#factor(x^b+a)~==1&for(n=1,9e9,ispseudoprime(n^b+a)&return(n));a==0 || a==64 || 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 factors but one equal 1. This happens for n=4, cf. example.
Comments