OFFSET
1,3
COMMENTS
See A225768 for motivation.
a(n) = 0 for n = m^3 (m > 1) but are there other cases of a(n)=0? - Zak Seidov, Nov 10 2014
EXAMPLE
a(7)=4 because 1^3+7=8, 2^3+7=15, 3^3+7=34 are all composite, but 4^3+7=71 is prime.
a(8)=0 because x^3+8 = (x+2)(x^2-2x+4) is composite for all integer values x>0.
PROG
(PARI) A225765(a, b=3)={#factor(x^b+a)~==1&for(n=1, 9e9, ispseudoprime(n^b+a)&return(n)); a==1&return(1); print1("/*"factor(x^b+a)"*/")} \\ For illustrative purpose only: the polynomial is factored to avoid an infinite search loop when it is composite. But this does not exclude that all but one factors might equal 1, therefore the factorization is printed for control before 0 is returned.
(PARI) a(n) = {if ((n!=1) && ispower(n, 3), return (0)); k = 1; while (! isprime(k^3+n), k++); k; } \\ Michel Marcus, Nov 10 2014
CROSSREFS
KEYWORD
nonn
AUTHOR
M. F. Hasler, Jul 25 2013
EXTENSIONS
More terms from Michel Marcus, Nov 10 2014
STATUS
approved