%I #27 Dec 30 2017 09:42:54
%S 71,2,2,5,2,3767,3,7,7,2,3,23,53,13,17,13,2,3,2,7,2,23,11,2,17,2,7,5,
%T 2,2,3,19,257,8039,13,2,2,59,3,5,17,3,2,61,2,3,3,37,313,2,631,17,5,3,
%U 17,2,17,2,7,97,2,47,3,29,2,2,31,47,2,7,19
%N Least prime p such that n + p^3 = x^2 + y^3 for some positive integers x and y, or 0 if no such prime p exists.
%C Conjecture: (i) Any integer can be written as x^2 + y^3 - p^3, where x and y are positive integers, and p is a prime.
%C (ii) Each integer can be written as x^2 - y^3 + p^3, where x and y are positive integers, and p is a prime.
%C See also A266230 and A266277 for related conjectures.
%C Is every prime in this sequence? - _David A. Corneth_, Dec 30 2017
%H Zhi-Wei Sun, <a href="/A266548/b266548.txt">Table of n, a(n) for n = 0..10000</a>
%H Zhi-Wei Sun, <a href="http://maths.nju.edu.cn/~zwsun/179b.pdf">New conjectures on representations of integers (I)</a>, Nanjing Univ. J. Math. Biquarterly 34(2017), no. 2, 97-120.
%e a(0) = 71 since 0 + 71^3 = 588^2 + 23^3 with 71 prime.
%e a(3) = 5 since 3 + 5^3 = 8^2 + 4^3 with 5 prime.
%e a(5) = 3767 since 5 + 3767^3 = 214886^2 + 1938^3 with 3767 prime.
%e a(2966) = 68371 since 2966 + 68371^3 = 17867983^2 + 6992^3 with 68371 prime.
%e a(7880) = 51137 since 7880 + 51137^3 = 10176509^2 + 31128^3 with 51137 prime.
%t p[n_]:=p[n]=Prime[n]
%t SQ[n_]:=SQ[n]=IntegerQ[Sqrt[n]]
%t Do[x=1;Label[bb];Do[If[SQ[n+p[x]^3-y^3],Print[n," ",p[x]];Goto[aa]],{y,1,(n+p[x]^3-1)^(1/3)}];x=x+1;Goto[bb];Label[aa];Continue,{n,0,70}]
%o (PARI) isokp(p, n) = {my(s = n+p^3); for (k=1, sqrtnint(s, 3), if ((q=s-k^3) && issquare(q), return (1)););}
%o a(n) = {p = 2; while(!isokp(p, n), p = nextprime(p+1)); p;} \\ _Michel Marcus_, Jan 04 2016
%o (PARI) a(n, {plim = 2}) = forprime(p = plim, oo, c = n + p^3; for(i = 1, sqrtnint(c, 3), if(issquare(c - i^3) && c - i^3 > 0, return(p))))
%o first(n, {plim = 100}) = {my(res = vector(n), l = List(), s, i, c);
%o for(u=1, sqrtint((n+plim^3)\1-1), for(v=1, sqrtnint((n+plim^3)\1-u^2, 3), listput(l, u^2+v^3))); l = Set(l); forprime(p = 2, plim, s = 1; while(l[s] < p^3 + 1, s++); for(i = s, #l, c = l[i] - p^3; if(c <= n, if(res[c] == 0, res[c] = p)
%o , next(2)))); for(i = 1, n, if(res[i] == 0, res[i] = a(i, plim + 1))); concat([71], res)} \\ _David A. Corneth_, Dec 30 2017
%Y Cf. A000040, A000290, A000578, A055394, A266152, A266153, A266230, A266231, A266277, A266314, A266363, A266364, A266528.
%K nonn
%O 0,1
%A _Zhi-Wei Sun_, Dec 31 2015