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.
%I A225768 #36 Feb 16 2025 08:33:19 %S A225768 0,1,1,2,1,18,1,2,0,2,1,54,1,28,3,2,1,18,1,2,399,26,1,6,5,2,21,0,1, %T A225768 288,1,4,3,2,105,6,1,2,33,2,1,546,1,2,3,2,1,6,35,2,51,20,1,12,5,28,9, %U A225768 4,1,18,1,4,63,2,0,18,1,2,3,28,1,6,1,2,15,2,35,24,1,12,3,4,1,42,115,2,111,2,1,18,91,6,3,2,3,6,1,28,3,2 %N A225768 Least k > 0 such that k^6 + n is prime, or 0 if k^6 + n is never prime. %C A225768 Motivated by the "particularly poor polynomial" n^6+1091 (composite for n=1,...,3905) mentioned on Weisstein's page about prime generating polynomials. %C A225768 We have a(n) = 0 if n is a cube n = g^3 with g > 1 because then k^6 + g^3 = (k^2 + g)*(k^4 - k^2*g + g^2), which can be prime only when n = g = 1. - _T. D. Noe_, Nov 18 2013 %C A225768 By the theorem of Brillhart, Filaseta and Odlyzko (see link), if a(n) > n > 1 then x^6 + n must be irreducible. If x^6 + n is irreducible, the Bunyakovsky conjecture implies a(n) is finite. - _Robert Israel_, Apr 25 2016 %H A225768 Robert Israel, <a href="/A225768/b225768.txt">Table of n, a(n) for n = 0..10000</a> %H A225768 J. Brillhart, M. Filaseta, and A. Odlyzko, <a href="https://dx.doi.org/10.4153%2FCJM-1981-080-0">On an irreducibility theorem of A. Cohn</a>, Canadian Journal of Mathematics 33(1981), 1055-1059. %H A225768 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/Prime-GeneratingPolynomial.html">Prime-Generating Polynomial</a>. %p A225768 f:= proc(n) local exact, x,k,F,nf,F1,C; %p A225768 iroot(n,3,exact); %p A225768 if exact and n > 1 then return 0 fi; %p A225768 if irreduc(x^6+n) then %p A225768 for k from 1+(n mod 2) by 2 do if isprime(k^6+n) then return k fi od %p A225768 else %p A225768 F:= factors(x^6+n)[2]; # %p A225768 F1:= map(t -> t[1],F); %p A225768 nf:= nops(F); %p A225768 C:= map(t -> op(map(rhs@op,{isolve(t^2-1)})),F1); %p A225768 for k in sort(convert(select(type,C,positive),list)) do %p A225768 if isprime(k^6+n) then return k fi %p A225768 od: %p A225768 0 %p A225768 fi %p A225768 end proc: %p A225768 map(f, [$0..100]); # _Robert Israel_, Apr 25 2016 %t A225768 {0, 1}~Join~Table[If[IrreduciblePolynomialQ[x^6 + n], SelectFirst[Range[1 + Mod[n, 2], 10^3, 2], PrimeQ[#^6 + n] &], 0], {n, 2, 120}] (* _Michael De Vlieger_, Apr 25 2016, Version 10 *) %o A225768 (PARI) {(a,b=6)->#factor(x^b+a)~==1 & for(n=1, 9e9, ispseudoprime(n^b+a)&return(n)); a==1&return(1);print1("/*"a":", factor(x^b+a)"*/")} /* For illustrative purpose only. The polynomial x^6+a is factored to avoid an infinite loop when it is composite. But there could be x such that this is prime, when all factors but one are 1 (not for exponent b=6, but, e.g., x=4 for exponent b=4), see A225766. */ %Y A225768 See A085099, A225765, A225767, A225769, A225770 for the k^2, k^3, ..., k^8 analogs. %K A225768 nonn %O A225768 0,4 %A A225768 _M. F. Hasler_, Jul 25 2013