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 A225765 #16 Nov 19 2014 09:27:51 %S A225765 1,1,2,1,2,1,4,0,2,1,2,1,6,3,2,1,6,1,4,3,2,1,2,5,4,3,0,1,2,1,10,3,2,3, %T A225765 2,1,4,5,2,1,6,1,4,3,2,1,6,5,4,11,2,1,2,5,6,3,8,1,2,1,6,3,2,0,2,1,4,5, %U A225765 10,1,2,1,4,3,2,3,6,1,24,3,2,1,12,13,4 %N A225765 Least k>0 such that k^3+n is prime, or 0 if there is no such k. %C A225765 See A225768 for motivation. %C A225765 a(n) = 0 for n = m^3 (m > 1) but are there other cases of a(n)=0? - _Zak Seidov_, Nov 10 2014 %e A225765 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. %e A225765 a(8)=0 because x^3+8 = (x+2)(x^2-2x+4) is composite for all integer values x>0. %o A225765 (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. %o A225765 (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 %Y A225765 See A085099, A225766, A225767, A225768 for the k^2, k^4, k^5, k^6 analog. %K A225765 nonn %O A225765 1,3 %A A225765 _M. F. Hasler_, Jul 25 2013 %E A225765 More terms from _Michel Marcus_, Nov 10 2014